Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions drivers/gles3/rasterizer_scene_gles3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2533,6 +2533,10 @@ void RasterizerSceneGLES3::render_scene(const Ref<RenderSceneBuffers> &p_render_
scene_state.prev_multiview_data = scene_state.multiview_data;
}

if (is_reflection_probe) {
apply_color_adjustments_in_post = false;
}

GLuint fbo = 0;
if (is_reflection_probe && GLES3::LightStorage::get_singleton()->reflection_probe_has_atlas_index(render_data.reflection_probe)) {
fbo = GLES3::LightStorage::get_singleton()->reflection_probe_instance_get_framebuffer(render_data.reflection_probe, render_data.reflection_probe_pass);
Expand Down
14 changes: 12 additions & 2 deletions drivers/gles3/shaders/scene.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -2517,11 +2517,16 @@ void main() {
frag_color.rgb = mix(frag_color.rgb, fog.rgb, fog.a);
#endif // !FOG_DISABLED

#ifdef DISABLE_REFLECTION_PROBE
// Tonemap before writing as we are writing to an sRGB framebuffer
frag_color.rgb *= exposure;

#ifdef APPLY_TONEMAPPING
frag_color.rgb = apply_tonemapping(frag_color.rgb, white);
#endif
#endif // APPLY_TONEMAPPING

#endif // DISABLE_REFLECTION_PROBE

frag_color.rgb = linear_to_srgb(frag_color.rgb);

#else // !BASE_PASS
Expand Down Expand Up @@ -2785,11 +2790,16 @@ void main() {
additive_light_color *= (1.0 - fog.a);
#endif // !FOG_DISABLED

#ifdef DISABLE_REFLECTION_PROBE
// Tonemap before writing as we are writing to an sRGB framebuffer
additive_light_color *= exposure;

#ifdef APPLY_TONEMAPPING
additive_light_color = apply_tonemapping(additive_light_color, white);
#endif
#endif // APPLY_TONEMAPPING

#endif // DISABLE_REFLECTION_PROBE

additive_light_color = linear_to_srgb(additive_light_color);

frag_color.rgb += additive_light_color;
Expand Down