Forgot to muliply with the batch's world transformation in the rte shadow matrix

This commit is contained in:
AlexandruPopovici
2022-08-15 16:11:21 +03:00
parent f43f8d7174
commit d35e321c15
2 changed files with 5 additions and 1 deletions
+3 -1
View File
@@ -40,4 +40,6 @@ sandbox.makeGenericUI()
sandbox.makeSceneUI()
sandbox.makeFilteringUI()
// Load demo object
sandbox.loadUrl('https://speckle.xyz/streams/e6f9156405/commits/0694d53bb5')
sandbox.loadUrl(
'https://speckle.xyz/streams/da9e320dad/commits/5388ef24b8?c=%5B-7.66134,10.82932,6.41935,-0.07739,-13.88552,1.8697,0,1%5D'
)
@@ -189,6 +189,7 @@ export default class SpeckleRenderer {
shadowMatrix.multiply(this.sun.shadow.camera.projectionMatrix)
shadowMatrix.multiply(rteView)
shadowMatrix.multiply(meshBatch.matrixWorld)
const material: SpeckleStandardMaterial =
meshBatch.material as SpeckleStandardMaterial
try {
@@ -375,6 +376,7 @@ export default class SpeckleRenderer {
this.sun.shadow.camera.far = Math.abs(lightSpaceBox.min.z)
this.sun.shadow.camera.updateProjectionMatrix()
this.renderer.shadowMap.needsUpdate = true
this.updateHelpers()
}
public updateHelpers() {