Light source color is now mixed with material specular if material is non-metal, not mixed if metal. Looks like we can deprecate IOR this way.
This commit is contained in:
parent
4287a8e827
commit
b526cff5fd
@ -392,7 +392,8 @@ void main(void)
|
||||
totalColor += (ambientColor * ambientLight + diffuseColor * diffuseLight) * kD;
|
||||
|
||||
#if OOSTD_SPECULAR
|
||||
totalColor += mix(specularColor, gl_LightSource[1].specular, f0) * specularLight;
|
||||
vec3 magSpec = specularColor.rgb;
|
||||
totalColor += mix(specularColor, gl_LightSource[1].specular, 1.0 - clamp(length(magSpec), 0.0, 1.0)) * specularLight;
|
||||
#endif
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user