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

GIProbe does not function properly when used on Gridmaps. #60240

Open
EzraT opened this issue Apr 14, 2022 · 2 comments
Open

GIProbe does not function properly when used on Gridmaps. #60240

EzraT opened this issue Apr 14, 2022 · 2 comments

Comments

@EzraT
Copy link

EzraT commented Apr 14, 2022

Godot version

v3.5.beta3.official

System information

GLES3 - All supported operating systems/GPU's.

Issue description

This is a compilation of my findings from some other issue's discussing problems with GridMaps and GIProbe lighting.
I thought it'd be a good idea to make a separate issue detailing this information, for clarity, as its scattered in the 2 different issues.

Sources: #18056, #18836

As explained here, there is a very clear difference to how GIProbe looks on regular MeshInstances and on GridMaps.

My hunch is that for whatever reason, perhaps because of a bug or an oversight, GIProbe is not applying the proper Bias value on GridMaps, which I explain further here.

The GIProbe lighting in the scene with just MeshInstances starts to look exactly the same as the one with GridMaps, when you turn the Bias in GIProbe down to 0.
It's as if the Bias on GridMaps is always 0, regardless of what is actually set in the GIProbe.

I hope this can be fixed because its quite a bummer GIProbe currently does not work with GridMaps.

Steps to reproduce

  1. Download the MRP and compare the 2 different scenes provided.
  2. In the scene that demonstrates only MeshInstances, select the GIProbe node and turn down the Bias value to 0.

Minimal reproduction project

Minimal Reproduction Project

@Calinou
Copy link
Member

Calinou commented Apr 14, 2022

As I understand it, the GIProbe bias and normal bias properties are only used in the shader, not in C++ code during baking. Therefore, you can change those properties in GIProbeData without having to bake the GIProbe again to see the results.

The uniforms are set here:

state.scene_shader.set_uniform(SceneShaderGLES3::GI_PROBE_BIAS1, gipi->probe ? gipi->probe->bias * bias_scale : 0.0);
state.scene_shader.set_uniform(SceneShaderGLES3::GI_PROBE_NORMAL_BIAS1, gipi->probe ? gipi->probe->normal_bias * bias_scale : 0.0);

PS: Does the same issue occur with the Normal Bias property? Try setting Bias to 0.0 and Normal Bias to 1.0, then compare a MeshInstance and a GridMap.

@EzraT
Copy link
Author

EzraT commented Apr 14, 2022

Its the same story for Normal Bias.
In the scene with the GridMap, both Bias and Normal Bias appear to do nothing, while in the scene with the MeshInstances they both function like you would expect it to.

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

2 participants