gpu: add option to use old texture brightness code
This commit is contained in:
@@ -30,6 +30,7 @@ uniform float brightness;
|
||||
uniform float smoothBanding;
|
||||
uniform vec4 fogColor;
|
||||
uniform int colorBlindMode;
|
||||
uniform float textureLightMode;
|
||||
|
||||
in vec4 Color;
|
||||
noperspective centroid in float fHsl;
|
||||
@@ -55,7 +56,8 @@ void main() {
|
||||
|
||||
// textured triangles hsl is a 7 bit lightness 2-126
|
||||
float light = fHsl / 127.f;
|
||||
c = textureColorBrightness * vec4(light, light, light, 1.f);
|
||||
vec3 mul = (1.f - textureLightMode) * vec3(light) + textureLightMode * Color.rgb;
|
||||
c = textureColorBrightness * vec4(mul, 1.f);
|
||||
} else {
|
||||
// pick interpolated hsl or rgb depending on smooth banding setting
|
||||
vec3 rgb = hslToRgb(int(fHsl)) * smoothBanding + Color.rgb * (1.f - smoothBanding);
|
||||
|
||||
Reference in New Issue
Block a user