@@ -16,8 +16,6 @@ CGPROGRAM
16
16
#pragma require compute
17
17
#pragma use_dxc
18
18
#pragma require 2darray
19
- #pragma multi_compile_instancing
20
- #pragma require instancing
21
19
22
20
// Enable proper multi-compile support for all stereo rendering modes
23
21
#pragma multi_compile_local _ UNITY_SINGLE_PASS_STEREO STEREO_INSTANCING_ON STEREO_MULTIVIEW_ON
@@ -44,8 +42,6 @@ v2f vert (appdata v)
44
42
45
43
float2 quadPos = float2 (vtxID&1 , (vtxID>>1 )&1 ) * 4.0 - 1.0 ;
46
44
o.vertex = UnityObjectToClipPos (float4 (quadPos, 1 , 1 ));
47
-
48
- o.uv = float2 (vtxID&1 , (vtxID>>1 )&1 );
49
45
return o;
50
46
}
51
47
@@ -60,24 +56,17 @@ int _CustomStereoEyeIndex;
60
56
half4 frag (v2f i) : SV_Target
61
57
{
62
58
uint eyeIndex = _CustomStereoEyeIndex;
63
- // return float4(eyeIndex == 0 ? 1 : 0, 0, eyeIndex == 1 ? 1 : 0, 1); // Red = left, Blue = right
64
-
65
59
// Normalize the pixel coordinates to [0,1] range
66
60
float2 normalizedUV = float2 (i.vertex.x / _ScreenParams .x, i.vertex.y / _ScreenParams .y);
61
+ half4 col;
67
62
68
- #if 1
69
- half4 col1, col2, col;
70
-
71
- // // Check if using separate eye textures
63
+ // Check if using separate eye textures
72
64
#if defined (UNITY_SINGLE_PASS_STEREO) || defined (STEREO_INSTANCING_ON) || defined (STEREO_MULTIVIEW_ON)
73
- col1 = UNITY_SAMPLE_TEX2DARRAY (_GaussianSplatRT, float3 (normalizedUV, 0 ));
74
- col2 = UNITY_SAMPLE_TEX2DARRAY (_GaussianSplatRT, float3 (normalizedUV, 1 ));
75
- col = col2 * eyeIndex + col1 * (1 - eyeIndex);
65
+ col = UNITY_SAMPLE_TEX2DARRAY (_GaussianSplatRT, float3 (normalizedUV, eyeIndex));
76
66
#else
77
67
// Fallback to legacy single-texture approach for backward compatibility
78
68
col = _GaussianSplatRT.Load (int3 (i.vertex.xy, 0 ));
79
69
#endif
80
- #endif
81
70
82
71
col.rgb = GammaToLinearSpace (col.rgb);
83
72
col.a = saturate (col.a * 1.5 );
0 commit comments