Merge pull request #92388 from sunfl0w/fix-compatibility-albedo

Fix albedo value wraparound in Compatibility render mode
This commit is contained in:
Rémi Verschelde 2024-06-14 10:19:21 +02:00
commit 4ce3e169a9
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -1523,6 +1523,9 @@ void main() {
#CODE : FRAGMENT #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 #ifdef LIGHT_VERTEX_USED
vertex = light_vertex; vertex = light_vertex;
#ifdef USE_MULTIVIEW #ifdef USE_MULTIVIEW