There was an error while loading. Please reload this page.
2 parents cfa0251 + a9969fd commit 68b1b0fCopy full SHA for 68b1b0f
1 file changed
Assets/Gothic-Core/Shaders/Barrier.shader
@@ -71,6 +71,17 @@ Shader "Unlit/Barrier"
71
v.uv.y += waveY * waveParams.x + (_MainTex_ST.y * (timeScaled - timeFloor)) + waveStrength;
72
73
o.vertex = UnityObjectToClipPos(v.vertex);
74
+
75
+ // The dome radius exceeds the dynamic (fog-sized) far-clip plane, so its far
76
+ // hemisphere would otherwise be clipped, leaving the barrier visible only at the
77
+ // screen edges. Pin any vertex beyond the far plane onto it (skybox technique);
78
+ // verts already inside keep their true depth, so nearer geometry still occludes.
79
+ #if defined(UNITY_REVERSED_Z)
80
+ o.vertex.z = max(o.vertex.z, 0.0);
81
+ #else
82
+ o.vertex.z = min(o.vertex.z, o.vertex.w);
83
+ #endif
84
85
o.uv = TRANSFORM_TEX(v.uv, _MainTex);
86
87
o.color = v.color;
0 commit comments