Skip to content
This repository was archived by the owner on Nov 30, 2020. It is now read-only.

Commit d9de0d9

Browse files
committed
Fixed SAO in non-ambient-only mode
1 parent 27d139b commit d9de0d9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

PostProcessing/Shaders/Builtins/ScalableAO.hlsl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,9 +383,10 @@ half BlurSmall(TEXTURE2D_ARGS(tex, samp), float2 uv, float2 delta)
383383
// Final composition shader
384384
float4 FragComposition(VaryingsDefault i) : SV_Target
385385
{
386-
float2 delta = _MainTex_TexelSize.xy / DOWNSAMPLE;
386+
float2 delta = _SAOcclusionTexture_TexelSize.xy / DOWNSAMPLE;
387387
half ao = BlurSmall(TEXTURE2D_PARAM(_SAOcclusionTexture, sampler_SAOcclusionTexture), i.texcoord, delta);
388-
return float4(EncodeAO(ao) * _AOColor, 0.0);
388+
ao = EncodeAO(ao);
389+
return float4(ao * _AOColor, ao);
389390
}
390391

391392
#if !SHADER_API_GLES // Excluding the MRT pass under GLES2

0 commit comments

Comments
 (0)