Update water material to include reflection properties
This commit is contained in:
@@ -2096,11 +2096,24 @@ export class ViewportHost {
|
|||||||
x: brush.size.x * 0.5,
|
x: brush.size.x * 0.5,
|
||||||
z: brush.size.z * 0.5
|
z: brush.size.z * 0.5
|
||||||
},
|
},
|
||||||
contactPatches
|
contactPatches,
|
||||||
|
reflection: {
|
||||||
|
texture: null,
|
||||||
|
enabled: faceId === "posY"
|
||||||
|
}
|
||||||
});
|
});
|
||||||
if (waterMaterial.animationUniform !== null) {
|
if (waterMaterial.animationUniform !== null) {
|
||||||
this.volumeAnimatedUniforms.push(waterMaterial.animationUniform);
|
this.volumeAnimatedUniforms.push(waterMaterial.animationUniform);
|
||||||
}
|
}
|
||||||
|
if (faceId === "posY" && waterMaterial.reflectionMatrixUniform !== null && waterMaterial.reflectionEnabledUniform !== null) {
|
||||||
|
this.viewportWaterSurfaceBindings.push({
|
||||||
|
brush,
|
||||||
|
reflectionTextureUniform: waterMaterial.reflectionTextureUniform,
|
||||||
|
reflectionMatrixUniform: waterMaterial.reflectionMatrixUniform,
|
||||||
|
reflectionEnabledUniform: waterMaterial.reflectionEnabledUniform,
|
||||||
|
reflectionRenderTarget: this.getWaterReflectionMode() !== "none" ? this.createWaterReflectionRenderTarget() : null
|
||||||
|
});
|
||||||
|
}
|
||||||
return waterMaterial.material;
|
return waterMaterial.material;
|
||||||
}
|
}
|
||||||
if (brush.volume.mode === "fog") {
|
if (brush.volume.mode === "fog") {
|
||||||
|
|||||||
Reference in New Issue
Block a user