-
-
Notifications
You must be signed in to change notification settings - Fork 21.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
Implement GI Reflections (SDFGI, VoxelGI) for LightmapGI #86135
base: master
Are you sure you want to change the base?
Conversation
Great work so far! I've added this to the agenda for the next rendering meeting. This idea has popped up a few times, but I think it will require some discussion and a lot more work. Particularly we need to discuss the workflow issues here and how to optimize out the calculation of diffuse lighting from VoxelGI/SDFGI. |
8cae994
to
07f7523
Compare
@atirut-w This seems to come from the mix of a lightmap with a dynamic directional light and the default specular occlusion mode. |
07f7523
to
7f78c6d
Compare
7f78c6d
to
6e447c1
Compare
Apparently, turning it off also darken reflections? |
(Moved to #86102) |
6e447c1
to
c1dee86
Compare
I accidentally included an old commit of the specular occlusion in it which made disabling it buggy. |
c1dee86
to
1bc7491
Compare
Would it be possible to have a simple scene that reproduce this? I'm not able to get black reflections :/ |
I managed to reproduce a slightly different behavior where everything except the sky is black: Lightmap.zip |
Weird. Clearing the shader cache doesn't solve it either. Here's the system information anyway, so that it may help: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally (rebased against master
17e7f85), it works as expected.
LightmapGI only
LightmapGI + SDFGI
Non-reflective materials appear darker because the material isn't fully rough (it's the fallback 3D material).
SDFGI only
No GI
1bc7491
to
5e29632
Compare
5e29632
to
d9ca537
Compare
I narrowed it down to something about AMD GPUs. I tested the MRP on my laptop which has Intel Xe graphics and the issure was not occuring there. I think this needs more testing on AMD GPUs like mine (RX 6700 XT) because it's a pretty breaking bug. One silver lining is that it only appears when specular occlusion is disabled, I guess? |
This complete a part of godotengine/godot-proposals#3012 (it doesn't address disabling VoxelGI reflections for SDFGI).
Depends on #86102 for Specular Occlusion.
(greatly exaggerated for showing the reflections, look in screenshots for the normal ones)
(scene from https://sketchfab.com/3d-models/japanese-street-at-night-fb1bdcd71a5544d699379d2d13dd1171)
This add support for reflections from GI such as SDFGI or VoxelGI onto lightmapped objects.
Benefits and constraints
LightmapGI + SDFGI
, but it's less thanSDFGI only
as we only apply the reflection buffer (further optimizations could be possible).VoxelGI + LightmapGI
has a smaller cost thanVoxelGI Only
as we only trace for reflection.Screenshots and Comparisons
'Reflection' scene
Source: https://github.com/Calinou/godot-reflection
Cube scene
Japanese Street
Source: https://sketchfab.com/3d-models/japanese-street-at-night-fb1bdcd71a5544d699379d2d13dd1171
Simple scene:
Caveats:
Open Questions:
¹ I posted some more screenshots (without specular occlusion) and benchmarks here godotengine/godot-proposals#3012 (comment).