Kaydet (Commit) 8cf3f7bb authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl

opengl: invert50 shader compilation error

- can't assign vec4 to vec2
- LHS of `&&' must be scalar boolean

Change-Id: I46bef7d41198ed1a33f9c3f7796f25358849852e
üst a04b4588
......@@ -10,9 +10,9 @@
/*precision mediump float;*/
void main() {
vec2 tex_mod = mod(gl_FragCoord, 2);
bool bLeft = tex_mod.x > 0 && tex_mod.x < 1;
bool bTop = tex_mod.y > 0 && tex_mod.y < 1;
vec2 tex_mod = mod(gl_FragCoord, 2).xy;
bool bLeft = (tex_mod.x > 0.0) && (tex_mod.x < 1.0);
bool bTop = (tex_mod.y > 0.0) && (tex_mod.y < 1.0);
// horrors - where is the XOR operator ?
if ((bTop && bLeft) || (!bTop && !bLeft))
gl_FragColor = vec4(255,255,255,0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment