]> git.tdb.fi Git - libs/gl.git/blobdiff - tests/glsl/expression_inline_iteration.glsl
Resolve and validate the parameters of constructors in GLSL
[libs/gl.git] / tests / glsl / expression_inline_iteration.glsl
index 20136ca40ef66e003f0dedca4a9efa76872fac35..fa17ae9565f2cf5ed33bf4eeb2f37385425a0b2e 100644 (file)
@@ -3,13 +3,13 @@ layout(location=0) in vec4 position;
 layout(location=1) in vec3 direction;
 void main()
 {
-       vec4 p = position.xyz;
+       vec3 p = position.xyz;
        int step = -1;
        for(int i=0; i<10; ++i)
        {
                float scale = 2.0;
                p += direction*scale;
-               if(p.z<0)
+               if(p.z<0.0)
                        break;
                step = i;
        }
@@ -21,15 +21,15 @@ layout(location=0) in vec4 position;
 layout(location=1) in vec3 direction;
 void main()
 {
-       vec4 p = position.xyz;
+       vec3 p = position.xyz;
        int step = -1;
        for(int i=0; i<10; ++i)
        {
                p += direction*2.0;
-               if(p.z<0)
+               if(p.z<0.0)
                        break;
                step = i;
        }
-       gl_Position = position+vec4(step, 0.0, 0.0, 0.0);
+       gl_Position = position+vec4(float(step), 0.0, 0.0, 0.0);
 }
 */