fix skybox clipping

This commit is contained in:
2023-03-03 16:19:44 +01:00
parent 70c603ad83
commit d834b76aac

View File

@@ -20,9 +20,9 @@
void vert(appdata_img v, out float4 pos : SV_POSITION) {
#ifdef UNITY_REVERSED_Z // clip space [near 1, 0 far]
float far = 0.00001;
float far = 0;
#else // clip space [near -1, 1 far]
float far = 0.99999;
float far = 1;
#endif
pos = float4(v.vertex.xy * 2.0, far, 1); // quad xy goes from -0.5 to 0.5, clip space from -1 to 1
}