You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MeshReflectorMaterial works fine for a planeGeometry created from ThreeJS, however it doesn't work out of the box for a plane geometry exported from Blender.
What I noticed is that it produces wrong reflections by default:
Correct reflections:
Workarounds
There are 2 workaorunds: one from Blender and one from JS (but requires patching the material source code).
Problem description:
MeshReflectorMaterial
works fine for a planeGeometry created from ThreeJS, however it doesn't work out of the box for a plane geometry exported from Blender.What I noticed is that it produces wrong reflections by default:
Correct reflections:

Workarounds
There are 2 workaorunds: one from Blender and one from JS (but requires patching the material source code).
In Blender:
In JS:
from
normal.set(0, 0, 1)
tonormal.set(0, 1, 0)
.I'm not sure if it's possible to derive a normal from a GLB plane programmatically though.
Relevant code:
In this codesanbox:
https://codesandbox.io/p/sandbox/376kv7
The text was updated successfully, but these errors were encountered: