Android: Another work around bug of Vertex Shader
authorTakumi ASAKI <asaki@sra.co.jp>
Wed, 3 Jun 2015 06:10:11 +0000 (15:10 +0900)
committerTakumi ASAKI <takumi.asaki@gmail.com>
Fri, 12 Jun 2015 02:56:11 +0000 (02:56 +0000)
Just like commit fd565ec6, this fixes another vertex shader compilation
issue on certain OpenGL drivers.

Change-Id: Ided3d6082fa0790659e9c242d0b43d7de5a2ae4d
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
src/quick/scenegraph/shaders/smoothtexture_core.vert

index a2489a39c526a1fab66409a502fee97e87f49afe..6821398e57192a0f009f1720699d8f302ad1d1e5 100644 (file)
@@ -50,5 +50,8 @@ void main()
 
     bool onEdge = any(notEqual(vertexOffset, vec2(0.)));
     bool outerEdge = all(equal(texCoordOffset, vec2(0.)));
-    vertexOpacity = onEdge && outerEdge ? 0. : opacity;
-}
\ No newline at end of file
+    if (onEdge && outerEdge)
+        vertexOpacity = 0.;
+    else
+        vertexOpacity = opacity;
+}