Merge pull request #12327 from tagcup/zero_roughness
Partially undo #11807.
This commit is contained in:
commit
bf4ba3d8c0
1 changed files with 2 additions and 2 deletions
|
@ -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 );
|
float dotNL = max(dot(N,L), 0.0 );
|
||||||
diffuse += dotNL * light_color / M_PI;
|
diffuse += dotNL * light_color / M_PI;
|
||||||
|
|
||||||
if (roughness < 1.0) {
|
if (roughness > 0.0) {
|
||||||
|
|
||||||
vec3 H = normalize(V + L);
|
vec3 H = normalize(V + L);
|
||||||
float dotNH = max(dot(N,H), 0.0 );
|
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
|
// D
|
||||||
|
|
Loading…
Reference in a new issue