Skip to content

Commit 6481e22

Browse files
committed
more cleanups
1 parent 50d836f commit 6481e22

File tree

2 files changed

+3
-16
lines changed

2 files changed

+3
-16
lines changed

package/Runtime/GaussianSplatURPFeature.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,6 @@ public override void RecordRenderGraph(RenderGraph renderGraph, ContextContainer
5252
rtDesc.depthBufferBits = 0;
5353
rtDesc.msaaSamples = 1;
5454
rtDesc.graphicsFormat = GraphicsFormat.R16G16B16A16_SFloat;
55-
Debug.Log($"isStereo: {isStereo}");
56-
Debug.Log($"Dimension: {rtDesc.dimension}");
57-
Debug.Log($"Volume: {rtDesc.volumeDepth}");
58-
Debug.Log($"stereoRenderingMode: {XRSettings.stereoRenderingMode}");
59-
TextureDesc desc = resourceData.activeColorTexture.GetDescriptor(renderGraph);
60-
Debug.Log($"xrReady: {desc.dimension}");
61-
Debug.Log($"rtDesc vrUsage: {rtDesc.vrUsage}");
6255

6356
// Create render texture
6457
var gaussianSplatRT = UniversalRenderer.CreateRenderGraphTexture(renderGraph, rtDesc, GaussianSplatRTName, true);

package/Shaders/GaussianComposite.shader

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,23 +58,17 @@ int _CustomStereoEyeIndex;
5858
half4 frag (v2f i) : SV_Target
5959
{
6060
uint eyeIndex = _CustomStereoEyeIndex;
61-
6261
// Normalize the pixel coordinates to [0,1] range
6362
float2 normalizedUV = float2(i.vertex.x / _ScreenParams.x, i.vertex.y / _ScreenParams.y);
63+
half4 col;
6464

65-
#if 1
66-
half4 col1, col2, col;
67-
68-
// // Check if using separate eye textures
65+
// Check if using separate eye textures
6966
#if defined(UNITY_SINGLE_PASS_STEREO) || defined(STEREO_INSTANCING_ON) || defined(STEREO_MULTIVIEW_ON)
70-
col1 = UNITY_SAMPLE_TEX2DARRAY(_GaussianSplatRT, float3(normalizedUV, 0));
71-
col2 = UNITY_SAMPLE_TEX2DARRAY(_GaussianSplatRT, float3(normalizedUV, 1));
72-
col = col2 * eyeIndex + col1 * (1 - eyeIndex);
67+
col = UNITY_SAMPLE_TEX2DARRAY(_GaussianSplatRT, float3(normalizedUV, eyeIndex));
7368
#else
7469
// Fallback to legacy single-texture approach for backward compatibility
7570
col = _GaussianSplatRT.Load(int3(i.vertex.xy, 0));
7671
#endif
77-
#endif
7872

7973
col.rgb = GammaToLinearSpace(col.rgb);
8074
col.a = saturate(col.a * 1.5);

0 commit comments

Comments
 (0)