summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortoasteater <48371905+toasteater@users.noreply.github.com>2019-03-09 10:37:37 +0800
committertoasteater <48371905+toasteater@users.noreply.github.com>2019-04-05 20:42:59 +0800
commit7cbfce7a8c9883693a54a589e45ef788f25643b2 (patch)
treed0a2da37f1c852c371f715e9db86541829b0b369
parent86d6a72c9745bd15e3217d63b2cc5ba73fe4ad34 (diff)
Respect keep_3d_linear when transparent_bg is on.
When transparent_bg is on, or the render target is too small, Godot would skip postprocessing and disregard keep_3d_linear. This fixes #26817.
-rw-r--r--drivers/gles3/rasterizer_scene_gles3.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gles3/rasterizer_scene_gles3.cpp b/drivers/gles3/rasterizer_scene_gles3.cpp
index 0c7d8c53d4..7bb56b1cc9 100644
--- a/drivers/gles3/rasterizer_scene_gles3.cpp
+++ b/drivers/gles3/rasterizer_scene_gles3.cpp
@@ -3648,7 +3648,7 @@ void RasterizerSceneGLES3::_post_process(Environment *env, const CameraMatrix &p
glBindFramebuffer(GL_FRAMEBUFFER, storage->frame.current_rt->fbo);
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, storage->frame.current_rt->effects.mip_maps[0].color);
- storage->shaders.copy.set_conditional(CopyShaderGLES3::LINEAR_TO_SRGB, true);
+ storage->shaders.copy.set_conditional(CopyShaderGLES3::LINEAR_TO_SRGB, !storage->frame.current_rt->flags[RasterizerStorage::RENDER_TARGET_KEEP_3D_LINEAR]);
storage->shaders.copy.set_conditional(CopyShaderGLES3::V_FLIP, storage->frame.current_rt->flags[RasterizerStorage::RENDER_TARGET_VFLIP]);
storage->shaders.copy.set_conditional(CopyShaderGLES3::DISABLE_ALPHA, !storage->frame.current_rt->flags[RasterizerStorage::RENDER_TARGET_TRANSPARENT]);
storage->shaders.copy.bind();