summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-10-01 21:51:11 -0300
committerJuan Linietsky <reduzio@gmail.com>2017-10-01 21:51:11 -0300
commit1b358783ce94400e348807c7e7db75233a67cc54 (patch)
tree8345a2157312c0c8dd411e298c6f68943f93649f /drivers
parentc864b782c05f5e2833afd69a4c0dfc6fbcfc4b26 (diff)
Slight proposed fixes to PBR.
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gles3/shaders/scene.glsl4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gles3/shaders/scene.glsl b/drivers/gles3/shaders/scene.glsl
index 715485dfba..26395da294 100644
--- a/drivers/gles3/shaders/scene.glsl
+++ b/drivers/gles3/shaders/scene.glsl
@@ -915,7 +915,7 @@ LIGHT_SHADER_CODE
#if defined(DIFFUSE_LAMBERT_WRAP)
//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)
@@ -969,7 +969,7 @@ LIGHT_SHADER_CODE
#endif
#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
diffuse += light_color * diffuse_color * light_amount * attenuation;
#endif