Skip to content

Commit

Permalink
馃悰 Take into consideration parent transforms, close #46
Browse files Browse the repository at this point in the history
  • Loading branch information
marcofugaro committed Jan 30, 2023
1 parent e8684c6 commit 9b68954
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ProjectedMaterial.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ export default class ProjectedMaterial extends THREE.MeshPhysicalMaterial {

this.uniforms.viewMatrixCamera.value.copy(viewMatrixCamera)
this.uniforms.projectionMatrixCamera.value.copy(projectionMatrixCamera)
this.uniforms.projPosition.value.copy(this.camera.position)
this.uniforms.projPosition.value.setFromMatrixPosition(modelMatrixCamera)
this.uniforms.projDirection.value.set(0, 0, 1).applyMatrix4(modelMatrixCamera)

// tell the shader we've projected
Expand Down

0 comments on commit 9b68954

Please sign in to comment.