How do shaders with render_mode "ambient_light_disabled" interact with ReflectionProbe's?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Ninfur

I’m writing a shader where I’m using the light() function to update the diffuse light. In order to prevent the ambient light from messing with the colors I’ve set the render_mode flag “ambient_light_disabled”.

This works great by itself, but I’ve noticed that as soon as the material enters the range of a ReflectionProbe the lighting drastically changes. Regardless of what value the roughness is set to. The material lighting seem to change similar to as if it were to receive ambient light.

What causes this behaviour, and is it possible to avoid it?

Example:

shader_type spatial;
render_mode ambient_light_disabled;

void light() {
    DIFFUSE_LIGHT = vec3(0.0, 0.0, 1.0);
}

Results in a perfectly blue color, as expected:

However, when it enters the range of a ReflectionProbe the following happens:

As a comparison, this is what the shader looks like without disabling ambient light:

In this case the shader looks the same whether or not it’s within range of the ReflectionProbe.

Update
After some additional testing I found that the shader is indeed affected by the world environment’s ambient light while it’s within range of a ReflectionProbe. Even though ambient light has been disabled in the shader. The color change is not related to sky reflections.

Not sure if this is a bug or if there is some logical explanation behind it.