]> git.tdb.fi Git - libs/gl.git/commitdiff
Test case tweaks
authorMikko Rasa <tdb@tdb.fi>
Tue, 16 Mar 2021 16:58:46 +0000 (18:58 +0200)
committerMikko Rasa <tdb@tdb.fi>
Tue, 16 Mar 2021 16:58:46 +0000 (18:58 +0200)
tests/glsl/complex_constant_condition_removal.glsl
tests/glsl/function_overloading.glsl

index 8a9d96ac5c77581cee1f4e0536a97b254be19a6b..5a2c588f07b9b76df91334be57a058ccf0198734 100644 (file)
@@ -15,7 +15,7 @@ void main()
 layout(location=0) out vec4 frag_color;
 void main()
 {
 layout(location=0) out vec4 frag_color;
 void main()
 {
-       if(lod+bias<threshold)
+       if(!(lod+bias>threshold))
                frag_color = color;
        else
                frag_color = vec4(1.0);
                frag_color = color;
        else
                frag_color = vec4(1.0);
index f74a793ba47ab0821180f0ee779d4d2a77daf984..e5561705fca8265eb4b205008984a50fbe972032 100644 (file)
@@ -5,8 +5,8 @@ uniform vec3 ambient;
 vec3 srgb_to_linear(vec3 color)
 {
        bvec3 near_zero = lessThan(color, vec3(0.04045));
 vec3 srgb_to_linear(vec3 color)
 {
        bvec3 near_zero = lessThan(color, vec3(0.04045));
-       vec3 gamma = pow((color.rgb+0.055)/1.055, vec3(2.4));
-       return mix(color.rgb/12.92, gamma, near_zero);
+       vec3 gamma = pow((color+0.055)/1.055, vec3(2.4));
+       return mix(color/12.92, gamma, near_zero);
 }
 vec4 srgb_to_linear(vec4 color)
 {
 }
 vec4 srgb_to_linear(vec4 color)
 {
@@ -49,6 +49,6 @@ void main()
 {
        vec4 color = texture(tex, _vs_out_texcoord);
        vec3 _srgb_to_linear_color = color.rgb;
 {
        vec4 color = texture(tex, _vs_out_texcoord);
        vec3 _srgb_to_linear_color = color.rgb;
-       frag_color = vec4(mix(_srgb_to_linear_color.rgb/12.92, pow((_srgb_to_linear_color.rgb+0.055)/1.055, vec3(2.4)), lessThan(_srgb_to_linear_color, vec3(0.04045))), color.a);
+       frag_color = vec4(mix(_srgb_to_linear_color/12.92, pow((_srgb_to_linear_color+0.055)/1.055, vec3(2.4)), lessThan(_srgb_to_linear_color, vec3(0.04045))), color.a);
 }
 */
 }
 */