-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GTAO occlusion is not used when colorBounce is enabled #14
Comments
aoData.a is used in the line above with gtao multibounce approximation:
|
So vec4 ssao(vec4 color, vec4 aoData, float intensity) {
#ifdef USE_SSAO_COLORS
vec3 albedoColor = color.rgb; //unlit color of the surface that we don't have ATM
vec3 colorWithAO = color.rgb * gtaoMultiBounce(aoData.a, albedoColor);
vec3 colorBounce = albedoColor * aoData.rgb;
color.rgb = mix(color.rgb, colorWithAO + colorBounce, intensity);
// color.rgb = vec3(aoData.aaa);
#else
color.rgb *= mix(vec3(1.0), vec3(aoData.r), intensity);
#endif
return color;
}
`` |
One way to avoid having to have both ssao.mix and ssao.aoIntensity is to reuse ssao.intensity to fade out GTAO's AO when below 1 visibility = mix(visibility, 1.0, 1.0 - clamp(uIntensity, 0.0, 1.0)); |
AO wish list
|
The bounce from baseColor vs directColor should look like that this Source We do get that reflection a bit if indirectDiffuse is present as they all (direct + indirect) add up to output color. |
@dmnsgn let's keep current code but with better variable names like mentioned in my comment above vec3 albedoColor = color.rgb; //TODO: unlit color of the surface that we don't have ATM
vec3 colorWithAO = color.rgb * gtaoMultiBounce(aoData.a, albedoColor);
vec3 colorBounce = albedoColor * aoData.rgb;
color.rgb = mix(color.rgb, colorWithAO + colorBounce, intensity); |
pex-shaders/shaders/chunks/ambient-occlusion.glsl.js
Line 25 in 59621b2
should be
The text was updated successfully, but these errors were encountered: