-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Broken environment reflections when using render to texture #7183
Comments
Interestingly this seems to work on WebGPU for me, only the WebGL has the issue. |
If I comment out this line from the example, all is fine. Need to investigte:
|
Learnings as I investigate this:
If I comment out this block, both rendering's match. So the problem is the fresnel term is incorrect in the texture. Could be either problem with viewDir, or with worldNormal. |
passing -litArgs_worldNormal to that function instead of litArgs_worldNormal solves this. Just need to figure out a generic solution, other implications. |
Bump, I'm running into this again. In that I'll need to add another workaround to flip the texture separate (I previously did this with the uvs). worst case scenario I could just knockup a little render pass to do it specifically for this camera and remove the other workarounds (bit of a waste of performance/memory though) |
I had a go at a variant of what you were working on and at first it appeared to work. It fixed the original example but then others were now inverted??? |
yep, that's where I concluded there is something not right with the model perhaps. |
Description
When rendering a model with a secondary camera into a renderTarget, the reflections are broken.
I was able to reproduce this using a totally clean checkout against latest main and v2.1.0. Weirdly enough the same code running on the examples website seems to work???
Steps to Reproduce
and add ContainerHandler + Basis
4. See that the model in the render to textures is super shiny and totally broken
The text was updated successfully, but these errors were encountered: