summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFerenc Arn <tagcup@yahoo.com>2017-10-22 16:18:54 -0400
committerFerenc Arn <tagcup@yahoo.com>2017-10-22 16:18:54 -0400
commitfd166d6fdaa9baf49e2dfc91d2e25b23aa708330 (patch)
treebddfa3e09dfce041aa2699ca535038b7028d0de7
parentacaaf2e440994bf99b9dcf1ba14ab4a7aa9be854 (diff)
Partially undo #11807.
Specular light at zero roughness needs some discussion. Until we do that, this fixes #12309.
-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 317ca91d98..bf0ebae3e3 100644
--- a/drivers/gles3/shaders/scene.glsl
+++ b/drivers/gles3/shaders/scene.glsl
@@ -169,7 +169,7 @@ void light_compute(vec3 N, vec3 L,vec3 V, vec3 light_color, float roughness, ino
float dotNL = max(dot(N,L), 0.0 );
diffuse += dotNL * light_color / M_PI;
- if (roughness < 1.0) {
+ if (roughness > 0.0) {
vec3 H = normalize(V + L);
float dotNH = max(dot(N,H), 0.0 );
@@ -1034,7 +1034,7 @@ LIGHT_SHADER_CODE
}
- if (roughness < 1.0) {
+ if (roughness > 0.0) { // FIXME: roughness == 0 should not disable specular light entirely
// D