Skip to content

Commit

Permalink
Merge pull request #92388 from sunfl0w/fix-compatibility-albedo
Browse files Browse the repository at this point in the history
Fix albedo value wraparound in Compatibility render mode
  • Loading branch information
akien-mga committed Jun 14, 2024
2 parents 680e489 + 0e56b64 commit 4ce3e16
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/gles3/shaders/scene.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4ce3e16

Please sign in to comment.