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
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
load the examples app locally
load up the render to texture example
load a model with shiny parts
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:
it happens on both WebGL and WebGPU, if we set flipY to true on the render target. The issue is related to the flipping. We currently do the flipping by mirroring the projection matrix along the Y.
The issue comes from fresnel calculation. We do 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.
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: