浏览代码

Fixed fragment shader compilation error on android (S0001: Cannot compare 'float' with 'int')

PouleyKetchoupp 6 年之前
父节点
当前提交
ab7759dbd1
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/gles3/shaders/scene.glsl

+ 1 - 1
drivers/gles3/shaders/scene.glsl

@@ -2028,7 +2028,7 @@ FRAGMENT_SHADER_CODE
 		//apply fog
 		//apply fog
 
 
 		if (fog_depth_enabled) {
 		if (fog_depth_enabled) {
-			float fog_far = fog_depth_end > 0 ? fog_depth_end : z_far;
+			float fog_far = fog_depth_end > 0.0 ? fog_depth_end : z_far;
 
 
 			float fog_z = smoothstep(fog_depth_begin, fog_far, length(vertex));
 			float fog_z = smoothstep(fog_depth_begin, fog_far, length(vertex));