summaryrefslogtreecommitdiffstats
path: root/drivers/gles3
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-06-14 10:19:21 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-06-14 10:19:21 +0200
commit4ce3e169a92b0a4a3a24f26e139eccb8a9400dac (patch)
treea2cd7a71b5508c12fb5b6637ef4edbffa3a91f34 /drivers/gles3
parent680e489189796af2c34f06df49e19b17dec5c6fc (diff)
parent0e56b64fc4bfefdc70f5a29bc0089404c24e597d (diff)
downloadredot-engine-4ce3e169a92b0a4a3a24f26e139eccb8a9400dac.tar.gz
Merge pull request #92388 from sunfl0w/fix-compatibility-albedo
Fix albedo value wraparound in Compatibility render mode
Diffstat (limited to 'drivers/gles3')
-rw-r--r--drivers/gles3/shaders/scene.glsl3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gles3/shaders/scene.glsl b/drivers/gles3/shaders/scene.glsl
index 2b372cb88d..be7a6aba57 100644
--- a/drivers/gles3/shaders/scene.glsl
+++ b/drivers/gles3/shaders/scene.glsl
@@ -1523,6 +1523,9 @@ void main() {
#CODE : FRAGMENT
}
+ // Keep albedo values in positive number range as negative values "wraparound" into positive numbers resulting in wrong colors
+ albedo = max(albedo, vec3(0.0));
+
#ifdef LIGHT_VERTEX_USED
vertex = light_vertex;
#ifdef USE_MULTIVIEW