Do not allow specvalue to be below 0.
Just in case it shouldnt be possible anyway.
This commit is contained in:
parent
0d982e55f0
commit
6b4430caaa
@ -14,6 +14,6 @@ vec3 getLightFactor(float specMapValue)
|
|||||||
vec3 DiffuseComponent = texture(DiffuseMap, tc).xyz;
|
vec3 DiffuseComponent = texture(DiffuseMap, tc).xyz;
|
||||||
vec3 SpecularComponent = texture(SpecularMap, tc).xyz;
|
vec3 SpecularComponent = texture(SpecularMap, tc).xyz;
|
||||||
float ao = texture(SSAO, tc).x;
|
float ao = texture(SSAO, tc).x;
|
||||||
vec3 tmp = DiffuseComponent + SpecularComponent * specMapValue;
|
vec3 tmp = DiffuseComponent + SpecularComponent * max(specMapValue, 0.);
|
||||||
return tmp * ao;
|
return tmp * ao;
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user