浏览代码

do not compute fog when using unshaded in GLES2

(cherry picked from commit 3365595254521a2d9d88241f4d2ada0fd3325573)
clayjohn 6 年之前
父节点
当前提交
480d87e7c8
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      drivers/gles2/shaders/scene.glsl

+ 2 - 2
drivers/gles2/shaders/scene.glsl

@@ -2102,8 +2102,6 @@ FRAGMENT_SHADER_CODE
 #endif
 	// gl_FragColor = vec4(normal, 1.0);
 
-#endif //unshaded
-
 //apply fog
 #if defined(FOG_DEPTH_ENABLED) || defined(FOG_HEIGHT_ENABLED)
 
@@ -2158,6 +2156,8 @@ FRAGMENT_SHADER_CODE
 
 #endif // defined(FOG_DEPTH_ENABLED) || defined(FOG_HEIGHT_ENABLED)
 
+#endif //unshaded
+
 #else // not RENDER_DEPTH
 //depth render
 #ifdef USE_RGBA_SHADOWS