pmndrs / drei

🥉 useful helpers for react-three-fiber
https://docs.pmnd.rs/drei
MIT License
8.38k stars 699 forks source link

MeshReflectorMaterial normalMap causes offset. And rotated meshes cause sharding on camera motion #1558

Closed pdkn closed 2 days ago

pdkn commented 1 year ago

Problem description:

Expected Behaviour:

  1. When normalMaps are added the reflection should not become offset on the x axis.
  2. When Panning / rotating the scene with OrbitControls, the reflection should stay vertically aligned to the camera rather than become shard'ed ( irrespective of mesh rotation )

Actual Behaviour:

  1. When normalMaps are added the reflection has an offset on the x axis.
  2. When Panning / rotating the scene with OrbitControls, the reflection is not vertically aligned to the camera. the effect looks shard'ed. I wonder if the mesh rotation is not being taken into consideration?

Relevant code:

Please see this folk of the MeshReflectorMaterial image-gallery demo. It has OrbitControls and normalMap/roughnessMap added. https://codesandbox.io/s/image-gallery-forked-rxlh55

Suggested solution:

I'm going through the MeshReflectorMaterial props to see if I can counter act these glitches but no joy so far. Any Thoughts?

pdkn commented 1 year ago

The storybook demo also exhibits the same offsetting issue https://drei.pmnd.rs/?path=/story/shaders-meshreflectormaterial--reflector-st

Felixcodet commented 1 year ago

I've encountered the same problem. I'm on

github-actions[bot] commented 1 week ago

Thank you for contributing! We’re marking this issue as stale as a gentle reminder to revisit it and give it the attention it needs to move forward.

Any activity, like adding an update or comment, will automatically remove the stale label so it stays on our radar.

Feel free to reach out on Discord if you need support or feedback from the community. This issue will close automatically soon if there’s no further activity. Thank you for understanding and for being part of the project!

github-actions[bot] commented 2 days ago

We’re closing this issue to keep our project manageable and make room for other active work, but we truly appreciate your effort and contribution.

If you’d like to continue working on this, please feel free to re-open it or reach out on Discord — our community is always ready to support you. Thanks again for helping us stay organized and for understanding our approach!