Skip to content

Commit

Permalink
Multiply ambient component with diffuse's surface (albedo) color.
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeyDeVries committed Dec 5, 2016
1 parent 47048b9 commit 5a17132
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/5.advanced_lighting/9.ssao/ssao_lighting.frag
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ void main()
float AmbientOcclusion = texture(ssao, TexCoords).r;

// Then calculate lighting as usual
vec3 ambient = vec3(0.3 * AmbientOcclusion);
vec3 ambient = vec3(0.3 * Diffuse * AmbientOcclusion);
vec3 lighting = ambient;
vec3 viewDir = normalize(-FragPos); // Viewpos is (0.0.0)
// Diffuse
Expand Down

0 comments on commit 5a17132

Please sign in to comment.