From a155291778c5f8aa30d21d186ce7ef3e0e5f6e7d Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Tue, 7 Apr 2026 06:43:08 +0200 Subject: [PATCH] Update water material handling with reflection properties --- src/runtime-three/runtime-host.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/runtime-three/runtime-host.js b/src/runtime-three/runtime-host.js index fba54bd5..9999ffc8 100644 --- a/src/runtime-three/runtime-host.js +++ b/src/runtime-three/runtime-host.js @@ -441,7 +441,11 @@ export class RuntimeHost { x: brush.size.x * 0.5, z: brush.size.z * 0.5 }, - contactPatches + contactPatches, + reflection: { + texture: null, + enabled: faceId === "posY" && this.getWaterReflectionMode() !== "none" + } }); if (waterMaterial.animationUniform !== null) { this.volumeAnimatedUniforms.push(waterMaterial.animationUniform); @@ -452,7 +456,11 @@ export class RuntimeHost { uniform: waterMaterial.contactPatchesUniform, axisUniform: waterMaterial.contactPatchAxesUniform, shapeUniform: waterMaterial.contactPatchShapesUniform ?? { value: [] }, - staticContactPatches + staticContactPatches, + reflectionTextureUniform: waterMaterial.reflectionTextureUniform, + reflectionMatrixUniform: waterMaterial.reflectionMatrixUniform, + reflectionEnabledUniform: waterMaterial.reflectionEnabledUniform, + reflectionRenderTarget: this.getWaterReflectionMode() !== "none" ? this.createWaterReflectionRenderTarget() : null }); } return waterMaterial.material;