Browse Source

Fix LegacyGrid Opacity and Color

Sébastien Vandenberghe 9 years ago
parent
commit
71bb0a009a

File diff suppressed because it is too large
+ 1 - 1
materialsLibrary/dist/babylon.gridMaterial.js


File diff suppressed because it is too large
+ 1 - 1
materialsLibrary/dist/babylon.gridMaterial.min.js


+ 12 - 1
materialsLibrary/materials/grid/legacygrid.fragment.fx

@@ -1,3 +1,14 @@
-void main(void) {
+uniform vec3 mainColor;
+uniform vec4 gridControl;
+
+void main(void) {
     gl_FragColor = vec4(1, 1, 1, 0.1);
     gl_FragColor = vec4(1, 1, 1, 0.1);
+    
+    #ifdef TRANSPARENT
+        // Min opacity as if there were no lines.
+        gl_FragColor = vec4(mainColor.rgb, 0.08);
+    #else
+        // Apply the color.
+        gl_FragColor = vec4(mainColor.rgb, 1.0);
+    #endif
 }
 }

File diff suppressed because it is too large
+ 15053 - 13541
materialsLibrary/test/refs/babylon.max.js