Skip to content
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

Only two ReflectionProbes are visible per mesh in GLES2 #36399

Closed
zoiba opened this issue Feb 20, 2020 · 11 comments
Closed

Only two ReflectionProbes are visible per mesh in GLES2 #36399

zoiba opened this issue Feb 20, 2020 · 11 comments

Comments

@zoiba
Copy link

zoiba commented Feb 20, 2020

Godot 3.2

verified on PC Linux and Oculus Quest

I'm using GLES2, I've set multiple reflection probes for covering the various rooms in a building, only the first two probes works.

Hide all the probes and the show them by clicking in a different sequence, only the first two you made visible will work.

testcase_reflection_probe.zip

@clayjohn
Copy link
Member

Does the building happen to be one large mesh? Only two probes can be used per mesh.

@zoiba
Copy link
Author

zoiba commented Feb 21, 2020

yes it does, large meshes are involved in building design. haven't found such limitation written on the documentation, thank you for the information.

@clayjohn
Copy link
Member

Oops. Looks like I misunderstood what you needed.

Only two probes can be visible at a single overlapping point per-mesh. However, you can have more per-mesh as long as they don't overlap. The renderer should select the closest two to use as you move around the building. It works correctly in GLES3.

@zoiba
Copy link
Author

zoiba commented Feb 21, 2020

I reworked the test case project so to don't have overlapping reflection probes. If I unhide the first probe it works fine. The second probe works but it seems the "enable interior" turns on and off depending form camera orientation. The third and fourth probes simply don't work. If I Unhide the fifth probe Godot freezes immediately or after moving the camera.
Here the test case updated:
testcase_reflection_probe.zip

@KoBeWi
Copy link
Member

KoBeWi commented Dec 21, 2020

Can anyone still reproduce this bug in Godot 3.2.3 or any later release?

@clktmr
Copy link
Contributor

clktmr commented Oct 12, 2021

I can reproduce this bug in 3.3.4. Behaviour is exactly as OP has written. A single probe works fine. Two probes cause flickering of ambient light depending on camera angle. A third and fourth probe don't render at all. I played around with the reflection settings in Project/Render Quality, but couldn't see any difference. Only happens with the GLES2 backend, GLES3 works fine.

@KoBeWi
Copy link
Member

KoBeWi commented Oct 12, 2021

Can you also check 3.4 beta?

@Calinou Calinou changed the title Limited number of Reflection Probes Only two ReflectionProbes are visible per mesh in GLES2 Oct 12, 2021
@clktmr
Copy link
Contributor

clktmr commented Oct 12, 2021

I have reproduced this with the current beta6. I've also attached my test scene.

I noticed one more thing: The reflection probes seem to get rendered correctly, as you can see by moving the MirrorSphere node around. The renderer only seems to fail selecting the correct probe for the mesh and blending between them seems to be broken in general.
GLES2-Reflections-TestScene.zip

@clktmr
Copy link
Contributor

clktmr commented Oct 12, 2021

@zoiba also mentioned the engine freezing. I can reproduce this whenever there are more than two reflection probes with update_mode = UPDATE_ALWAYS.

@clktmr
Copy link
Contributor

clktmr commented Oct 12, 2021

I took a look into this myself and gladly there was a simple fix for the flickering. I also found that there is indeed a limit of two refprobes per mesh in GLES2 as stated in rasterizer_scene_gles2.cpp:1079 which I added to the docs:

			rpsize = MIN(rpsize, 2); //more than 2 per object are not supported, this keeps it stable

However, the MR doesn't solve the freeze issue and there might still be issues if the refprobes are very close to each other.

@akien-mga akien-mga added this to the 3.4 milestone Oct 13, 2021
@akien-mga
Copy link
Member

Fixed by #53740.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants