mirror of
https://github.com/godotengine/godot.git
synced 2024-11-21 03:18:37 +08:00
Fix albedo value wraparound in Compatibility render mode
Using the Compatibility renderer results in wrapped albedo values if a custom shader returns albedo values outside the expected range of [0,1]. This commit fixed this issue by clamping the albedo value to [0,1] right after the custom shader is executed. Fixes #91919
This commit is contained in:
parent
be56cab58c
commit
0e56b64fc4
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user