bx-1140-postprocessing #12

Merged
ksenia_mikhailova merged 18 commits from bx-1140-postprocessing into dev 2024-07-30 09:17:41 +03:00
2 changed files with 5 additions and 12 deletions
Showing only changes of commit 4f6531a7af - Show all commits

View File

@ -33,13 +33,6 @@ const tiltShift = reactive({}) as { focus: number, aperture: number, maxblur: nu
const groundTexture = await useTexture({
displacementMap: '/ground_displacement.jpg',
})
const ground = reactive({
color: props.clearColor,
displacementMap: groundTexture.displacementMap,
displacementScale: 50,
roughness: 100,
side: DoubleSide
})
// renderer.value.capabilities.maxTextures = 4
// renderer.value.capabilities.maxTextureSize = 512
@ -53,9 +46,9 @@ const loadModels = async () => {
envVars.hdr_json = raw_data.hdr_json ? `${IMAGE_URL}/${raw_data.hdr_json}` : undefined
envVars.hdr_webp = raw_data.hdr_webp ? `${IMAGE_URL}/${raw_data.hdr_webp}` : undefined
tiltShift.focus = raw_data.min_distance * 0.75
tiltShift.aperture = 3
tiltShift.maxblur = 1
tiltShift.focus = raw_data.min_distance * 1
tiltShift.aperture = 0.1
tiltShift.maxblur = 5
const data = raw_data.elements
if (!controls.value) return;
@ -144,7 +137,7 @@ const loadModels = async () => {
box.getSize(box_size)
props.loaded_pan(
new Vector3(box_size.x * 0.5, box_size.y * 0.5, box_size.z * 0.5),
new Vector3(box_size.x * -0.5, box_size.y * -0.5, box_size.z * -0.5),
new Vector3(box_size.x * -0.5, box_size.y * -0.25, box_size.z * -0.5),
)
}

View File

@ -15,7 +15,7 @@ const { renderer, camera, scene } = useTresContext()
const composer = new EffectComposer(renderer.value);
const props = defineProps(['tiltShift', 'clearColor'])
const k = { start: 0.75, end: 3 }
const k = { start: 0.5, end: 3 }
if (camera.value) {
const renderPass = new RenderPass(scene.value, camera.value);