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

Commit fe19831

Browse files
committed
Add aspect ratio neutrality to Screen Space Reflection's vignette
1 parent c37c257 commit fe19831

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

PostProcessing/Shaders/Builtins/ScreenSpaceReflections.hlsl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ float Attenuate(float2 uv)
101101
float Vignette(float2 uv)
102102
{
103103
float2 k = abs(uv - 0.5) * SSR_VIGNETTE_INTENSITY;
104+
k.x *= _MainTex_TexelSize.y * _MainTex_TexelSize.z;
104105
return pow(saturate(1.0 - dot(k, k)), SSR_VIGNETTE_SMOOTHNESS);
105106
}
106107

0 commit comments

Comments
 (0)