- Fix black pixels when subtractive lights are in range for PBR materials

This commit is contained in:
Magnus Norddahl 2018-03-26 00:01:52 +02:00
parent 98c7118a3a
commit 4ffa344f7d
1 changed files with 1 additions and 1 deletions

View File

@ -181,7 +181,7 @@ vec3 ProcessMaterial(vec3 albedo, vec3 ambientLight)
//vec3 ambient = (kD * diffuse + specular) * ao; //vec3 ambient = (kD * diffuse + specular) * ao;
vec3 ambient = (kD * diffuse) * ao; vec3 ambient = (kD * diffuse) * ao;
vec3 color = ambient + Lo; vec3 color = max(ambient + Lo, vec3(0.0));
// Tonemap (reinhard) and apply sRGB gamma // Tonemap (reinhard) and apply sRGB gamma
//color = color / (color + vec3(1.0)); //color = color / (color + vec3(1.0));