소스 검색

Fix LegacyGrid Opacity and Color

Sébastien Vandenberghe 9 년 전
부모
커밋
71bb0a009a

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
materialsLibrary/dist/babylon.gridMaterial.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 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);
+    
+    #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
 }

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 15053 - 13541
materialsLibrary/test/refs/babylon.max.js