Shader strange/cool bug?

I was playing around with shaders and found this strange bug(?) when using empty variables


//
// A basic fragment shader
//

//Default precision qualifier
precision highp float;

//This represents the current texture on the mesh
uniform lowp sampler2D texture;

//The interpolated vertex color for this fragment
varying lowp vec4 vColor;

//The interpolated texture coordinate for this fragment
varying highp vec2 vTexCoord;

void main()
{
    //Sample the texture at the interpolated coordinate
    lowp vec4 col = texture2D( texture, vTexCoord ) * vColor;
    
    lowp vec3 shade;
    
    //Set the output color to the texture color
    gl_FragColor = vec4(col.rgb * shade, col.a);
}

Can you explain what it does? I’m too lazy to paste it. :stuck_out_tongue:

Maybe a picture of video?

Interesting effect, seems to cause the colours to become distorted. It looks like the precision has some bearing over it, changing shade from lowpto highp produces a more obvious result (colour is removed and it becomes black) it also looks awesome using add or subtract instead of multiply but why it happens I don’t know :smiley:

Okay, wow, that is cool. I think that’d be an OpenGL bug though, not Codea.