浏览代码

Slight proposed fixes to PBR.

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

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

@@ -915,7 +915,7 @@ LIGHT_SHADER_CODE
 
 
 #if defined(DIFFUSE_LAMBERT_WRAP)
 #if defined(DIFFUSE_LAMBERT_WRAP)
 	//energy conserving lambert wrap shader
 	//energy conserving lambert wrap shader
-	light_amount = max(0.0,(dot(N,L) + roughness) / ((1.0 + roughness) * (1.0 + roughness) * M_PI));
+	light_amount = max(0.0,(dot(N,L) + roughness) / ((1.0 + roughness) * (1.0 + roughness)));
 
 
 #elif defined(DIFFUSE_OREN_NAYAR)
 #elif defined(DIFFUSE_OREN_NAYAR)
 
 
@@ -969,7 +969,7 @@ LIGHT_SHADER_CODE
 #endif
 #endif
 
 
 #if defined(TRANSMISSION_USED)
 #if defined(TRANSMISSION_USED)
-	diffuse += light_color * diffuse_color * mix(vec3(light_amount),vec3(1.0),transmission) * attenuation;
+	diffuse += light_color * diffuse_color * mix(vec3(light_amount),vec3(M_PI),transmission) * attenuation;
 #else
 #else
 	diffuse += light_color * diffuse_color * light_amount * attenuation;
 	diffuse += light_color * diffuse_color * light_amount * attenuation;
 #endif
 #endif