Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Assets/Shaders/AtmosphericScattering.shader
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,10 @@ Shader "Hidden/AtmosphericScattering"
float4 fragDir(v2f i) : COLOR0
{
float2 uv = i.uv.xy;
float depth = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, uv);
#ifdef UNITY_UV_STARTS_AT_TOP
uv.y = 1.0 - uv.y;
#endif
float depth = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, i.uv.xy);
float linearDepth = Linear01Depth(depth);

float3 wpos = i.wpos;
Expand Down