SSR now keeps albedo color properly instead of fading to black
This commit is contained in:
@@ -27,5 +27,5 @@ void main()
|
||||
vec4 a = texture(u_Source, UV);
|
||||
vec4 b = texture(u_Source2, UV);
|
||||
|
||||
FragColor = vec4(vec3(a.rgb + b.rgb / 2.0), a.a * b.a);
|
||||
FragColor = vec4(vec3(a.rgb + (b.rgb) / 2.0), a.a);
|
||||
}
|
||||
@@ -272,7 +272,7 @@ void main()
|
||||
|
||||
// scale light by NdotL
|
||||
float NdotL = max(dot(N, L), 0.0);
|
||||
Lo += (kD * albedo / PI) * radiance * NdotL;// note that we already multiplied the BRDF by the Fresnel (kS) so we won't multiply by kS again
|
||||
Lo += (kD * albedo / PI + specular) * radiance * NdotL;// note that we already multiplied the BRDF by the Fresnel (kS) so we won't multiply by kS again
|
||||
}
|
||||
|
||||
/// ambient lighting (we now use IBL as the ambient term)
|
||||
@@ -282,7 +282,7 @@ void main()
|
||||
vec3 kD = 1.0 - kS;
|
||||
kD *= 1.0 - metallic;
|
||||
|
||||
vec3 ambient = (kD * albedo) * (ao) * ssao;
|
||||
vec3 ambient = (vec3(0.5) * albedo) * (ao)*ssao;
|
||||
vec3 color = (ambient) + Lo;
|
||||
|
||||
// Display CSM splits..
|
||||
|
||||
Reference in New Issue
Block a user