diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-10-02 09:09:22 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-10-02 09:09:32 -0300 |
commit | 66987d687879017affb787b4a3ffb1ef11880336 (patch) | |
tree | 4862ed0b7515207a3fde7f842bd2acf1f4d6ac96 /drivers | |
parent | cf17b081f1699cd714d2a1dc02b61cd6f002bce7 (diff) |
missing PI division on vertex shader
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gles3/shaders/scene.glsl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gles3/shaders/scene.glsl b/drivers/gles3/shaders/scene.glsl index 26395da294..41d5ef5bc9 100644 --- a/drivers/gles3/shaders/scene.glsl +++ b/drivers/gles3/shaders/scene.glsl @@ -1,5 +1,6 @@ [vertex] +#define M_PI 3.14159265359 /* from VisualServer: @@ -166,7 +167,7 @@ out vec4 specular_light_interp; void light_compute(vec3 N, vec3 L,vec3 V, vec3 light_color,float roughness,inout vec3 diffuse, inout vec3 specular) { float dotNL = max(dot(N,L), 0.0 ); - diffuse += dotNL * light_color; + diffuse += dotNL * light_color / M_PI; if (roughness > 0.0) { |