godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
90.87k stars 21.14k forks source link

ReflectionProbes don't work predictably in VR when rendering with GLES3 #48941

Open rhodochrone opened 3 years ago

rhodochrone commented 3 years ago

Godot 3.3 Stable Windows 10, GLES3, Windows Mixed Reality, running on GTX 1060

Reflections via ReflectionProbes are not consistent with the viewport when running ARVR on GLES3. image

Steps to reproduce: Using OpenVR addon, add the necessary script to set the Viewport to ARVR. Place MeshInstances and make a mesh's material highly reflective. Add a reflection probe. Within the viewport, reflections of surrounding geometry look correct. When running in ARVR, the reflection will be dark and indistinct. The ReflectionProbe is not completely absent in VR, as some ambient lighting effects seem to translate correctly. I found reflections work properly with GLES2. Minimal Reproduction Project: gdmrp reflectionprobe arvr.zip

josefkaragoli commented 3 years ago

I can confirm this. I think it happens because the reflections are captured before the scene is actually loaded, leading to it not actually capturing the reflections

josefkaragoli commented 3 years ago

I think the only reasonable solution would be to add the option to prebake the reflection map into a resource file rather than capture it on scene loading

Calinou commented 3 years ago

I think the only reasonable solution would be to add the option to prebake the reflection map into a resource file rather than capture it on scene loading

According to OP, reflection probe rendering works in GLES2. Can't we fix it in GLES3 too?

josefkaragoli commented 3 years ago

If it doesnt happen in GLES2 I'm probably wrong about my theory

rhodochrone commented 3 years ago

If it doesnt happen in GLES2 I'm probably wrong about my theory

I'm pretty sure setting the update mode to Constant instead of Once doesn't improve the situation either.