fix: With Phong lighting limit object color by diffuse color
This commit is contained in:
parent
c84d04c936
commit
807f6d1985
1 changed files with 3 additions and 0 deletions
|
@ -623,6 +623,9 @@ void main() {
|
||||||
|
|
||||||
objectColor += (1.0 - shadow) * (diffuse + specular);
|
objectColor += (1.0 - shadow) * (diffuse + specular);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
objectColor = min(objectColor, diffuseSample.rgb);
|
||||||
|
|
||||||
} else if (isFeatureEnabled(FEATURE_LIGHTMAP)) {
|
} else if (isFeatureEnabled(FEATURE_LIGHTMAP)) {
|
||||||
vec4 lightmapSample = texture(uLightmap, fragLightmapCoords);
|
vec4 lightmapSample = texture(uLightmap, fragLightmapCoords);
|
||||||
float S = max(0.0, 1.0 - (shadow - dot(uAmbientColor.rgb, LUMINANCE)));
|
float S = max(0.0, 1.0 - (shadow - dot(uAmbientColor.rgb, LUMINANCE)));
|
||||||
|
|
Loading…
Reference in a new issue