Skip to content

Commit 2732801

Browse files
authored
Minor performance improvements to SSGI (case 1367144). (#5921)
* Minor performance improvements to SSGI (case 1367144). * Fix tests
1 parent 897f3a3 commit 2732801

File tree

13 files changed

+269
-132
lines changed

13 files changed

+269
-132
lines changed

com.unity.render-pipelines.high-definition/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
3939
- Fix API warnings in Matcap mode on Metal.
4040
- Fix D3D validation layer errors w.r.t shadow textures when an atlas is not used.
4141
- Fixed anchor position offset property for the Light Anchor component. (case 1362809)
42+
- Fixed minor performance issues in SSGI (case 1367144).
4243

4344
## [13.0.0] - 2021-09-01
4445

Lines changed: 83 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#pragma kernel BilateralUpSampleSingle BILATERAL_UPSAMPLE=BilateralUpSampleSingle SINGLE_CHANNEL
21
#pragma kernel BilateralUpSampleColor BILATERAL_UPSAMPLE=BilateralUpSampleColor
32

43
//#pragma enable_d3d11_debug_symbols
@@ -10,78 +9,103 @@
109
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl"
1110
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/RayTracingCommon.hlsl"
1211
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/BilateralUpsample.hlsl"
12+
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/BilateralUpsampleDef.cs.hlsl"
1313

1414
// Mip chain depth buffer
1515
TEXTURE2D_X(_DepthTexture);
1616
// The half resolution texture that needs to be upscaled
1717
TEXTURE2D_X(_LowResolutionTexture);
1818

19-
// Constant buffer where all variables should land
20-
CBUFFER_START(UnityScreenSpaceGlobalIllumination)
21-
float4 _HalfScreenSize;
22-
float2 _DepthPyramidFirstMipLevelOffset;
23-
CBUFFER_END
19+
// LDS that store the half resolution data
20+
groupshared float3 gs_cacheLighting[36];
21+
groupshared float gs_cacheDepth[36];
22+
23+
void FillUpsampleDataLDS(uint groupIndex, uint2 groupOrigin)
24+
{
25+
// Define which value we will be acessing with this worker thread
26+
int acessCoordX = groupIndex % 6;
27+
int acessCoordY = groupIndex / 6;
28+
29+
// Everything we are accessing is in intermediate res (half rez).
30+
uint2 traceGroupOrigin = groupOrigin / 2;
31+
32+
// The initial position of the access
33+
int2 originXY = traceGroupOrigin - int2(1, 1);
34+
35+
// Compute the sample position
36+
int2 sampleCoord = int2(clamp(originXY.x + acessCoordX, 0, _HalfScreenSize.x - 1), clamp(originXY.y + acessCoordY, 0, _HalfScreenSize.y - 1));
37+
38+
// Sample and store into the LDS
39+
gs_cacheLighting[groupIndex] = LOAD_TEXTURE2D_X(_LowResolutionTexture, sampleCoord).xyz;
40+
// As an input we are not using the depth pyramid, but the full resolution depth (so we need to make sure to read from there for the upsample aswell).
41+
gs_cacheDepth[groupIndex] = LOAD_TEXTURE2D_X(_DepthTexture, sampleCoord * 2).x;
42+
}
43+
44+
uint OffsetToLDSAdress(uint2 groupThreadId, int2 offset)
45+
{
46+
// Compute the tap coordinate in the 6x6 grid
47+
uint2 tapAddress = (uint2)((int2)(groupThreadId / 2 + 1) + offset);
48+
return clamp((uint)(tapAddress.x) % 6 + tapAddress.y * 6, 0, 35);
49+
}
50+
51+
// Function that fills the struct as we cannot use arrays
52+
void FillUpsampleNeighborhoodData_2x2(int2 groupThreadId, int subRegionIdx, out NeighborhoodUpsampleData2x2_RGB neighborhoodData)
53+
{
54+
// Fill the sample data
55+
int tapIdx = OffsetToLDSAdress(groupThreadId, int2((int)_TapOffsets[2 * subRegionIdx].x, (int)_TapOffsets[2 * subRegionIdx].y));
56+
neighborhoodData.lowValue0 = max(0, (gs_cacheLighting[tapIdx]));
57+
neighborhoodData.lowDepth.x = gs_cacheDepth[tapIdx];
58+
neighborhoodData.lowWeight.x = _DistanceBasedWeights[subRegionIdx].x;
59+
60+
tapIdx = OffsetToLDSAdress(groupThreadId, int2((int)_TapOffsets[2 * subRegionIdx].z, (int)_TapOffsets[2 * subRegionIdx].w));
61+
neighborhoodData.lowValue1 = max(0, (gs_cacheLighting[tapIdx]));
62+
neighborhoodData.lowDepth.y = gs_cacheDepth[tapIdx];
63+
neighborhoodData.lowWeight.y = _DistanceBasedWeights[subRegionIdx].y;
64+
65+
tapIdx = OffsetToLDSAdress(groupThreadId, int2((int)_TapOffsets[2 * subRegionIdx + 1].x, (int)_TapOffsets[2 * subRegionIdx + 1].y));
66+
neighborhoodData.lowValue2 = max(0, (gs_cacheLighting[tapIdx]));
67+
neighborhoodData.lowDepth.z = gs_cacheDepth[tapIdx];
68+
neighborhoodData.lowWeight.z = _DistanceBasedWeights[subRegionIdx].z;
69+
70+
tapIdx = OffsetToLDSAdress(groupThreadId, int2((int)_TapOffsets[2 * subRegionIdx + 1].z, (int)_TapOffsets[2 * subRegionIdx + 1].w));
71+
neighborhoodData.lowValue3 = max(0, (gs_cacheLighting[tapIdx]));
72+
neighborhoodData.lowDepth.w = gs_cacheDepth[tapIdx];
73+
neighborhoodData.lowWeight.w = _DistanceBasedWeights[subRegionIdx].w;
74+
}
2475

2576
// The output of our upscaling pass
26-
RW_TEXTURE2D_X(float4, _OutputUpscaledTexture);
77+
RW_TEXTURE2D_X(float3, _OutputUpscaledTexture);
2778

2879
[numthreads(BILATERAL_UPSAMPLE_TILE_SIZE, BILATERAL_UPSAMPLE_TILE_SIZE, 1)]
29-
void BILATERAL_UPSAMPLE(uint3 dispatchThreadId : SV_DispatchThreadID, uint2 groupThreadId : SV_GroupThreadID, uint2 groupId : SV_GroupID)
80+
void BILATERAL_UPSAMPLE(uint3 currentCoord : SV_DispatchThreadID,
81+
int groupIndex : SV_GroupIndex,
82+
uint2 groupThreadId : SV_GroupThreadID,
83+
uint2 groupId : SV_GroupID)
3084
{
31-
UNITY_XR_ASSIGN_VIEW_INDEX(dispatchThreadId.z);
85+
UNITY_XR_ASSIGN_VIEW_INDEX(currentCoord.z);
86+
87+
// Only 36 workers of the 64 region do the pre-fetching
88+
if (groupIndex < 36)
89+
{
90+
// Load 1 value per thread
91+
FillUpsampleDataLDS(groupIndex, groupId * 8);
92+
}
93+
94+
// Make sure all values are loaded in LDS by now.
95+
GroupMemoryBarrierWithGroupSync();
3296

3397
// If out of bounds, discard
34-
if (any(dispatchThreadId.xy > uint2(_ScreenSize.xy)))
98+
if (any(currentCoord.xy > uint2(_ScreenSize.xy)))
3599
return;
36100

37-
// The pixel position to process
38-
const uint2 outputCoord = dispatchThreadId.xy;
39-
40101
// Read the depth value as early as possible and use it as late as possible
41-
float hiResDepth = LOAD_TEXTURE2D_X(_DepthTexture, outputCoord).x;
42-
43-
// Define what is the half resolution of this pixel
44-
int2 halfResolution = (int2)(outputCoord / 2);
45-
46-
// Define what is the half resolution of this pixel
47-
int2 coordRepresenatative = halfResolution * 2;
48-
49-
// Compute the shift within the half res
50-
int2 halfResShift = outputCoord - coordRepresenatative;
51-
52-
// Compute the shift of the pixel in the group
53-
int shiftIndex = halfResShift.y * 2 + halfResShift.x;
54-
55-
// Compute the shift in the upscale table
56-
int offsetInCoordTable = shiftIndex * 4;
57-
58-
// Compute the half resolution coordinates we should tap from
59-
int2 halfResTap0 = clamp(0, halfResolution + UpscaleBilateralPixels[offsetInCoordTable], _HalfScreenSize.xy - 1);
60-
int2 halfResTap1 = clamp(0, halfResolution + UpscaleBilateralPixels[offsetInCoordTable + 1], _HalfScreenSize.xy - 1);
61-
int2 halfResTap2 = clamp(0, halfResolution + UpscaleBilateralPixels[offsetInCoordTable + 2], _HalfScreenSize.xy - 1);
62-
int2 halfResTap3 = clamp(0, halfResolution + UpscaleBilateralPixels[offsetInCoordTable + 3], _HalfScreenSize.xy - 1);
63-
64-
// Grab the depth of all the half resolution pixels
65-
float4 lowDepths = float4(LOAD_TEXTURE2D_X(_DepthTexture, asuint(_DepthPyramidFirstMipLevelOffset) + halfResTap0).x
66-
, LOAD_TEXTURE2D_X(_DepthTexture, asuint(_DepthPyramidFirstMipLevelOffset) + halfResTap1).x
67-
, LOAD_TEXTURE2D_X(_DepthTexture, asuint(_DepthPyramidFirstMipLevelOffset) + halfResTap2).x
68-
, LOAD_TEXTURE2D_X(_DepthTexture, asuint(_DepthPyramidFirstMipLevelOffset) + halfResTap3).x);
69-
70-
#if SINGLE_CHANNEL
71-
// Grab all the scalar values required for upscale
72-
float4 lowRes = float4(_LowResolutionTexture[COORD_TEXTURE2D_X(halfResTap0)].x
73-
, _LowResolutionTexture[COORD_TEXTURE2D_X(halfResTap1)].x
74-
, _LowResolutionTexture[COORD_TEXTURE2D_X(halfResTap2)].x
75-
, _LowResolutionTexture[COORD_TEXTURE2D_X(halfResTap3)].x);
76-
// Upscale and output
77-
_OutputUpscaledTexture[COORD_TEXTURE2D_X(outputCoord)] = BilUpSingle(hiResDepth, lowDepths, lowRes);
78-
#else
79-
// Grab all the color values required for upscale
80-
float4 lowResCol0 = max(0, _LowResolutionTexture[COORD_TEXTURE2D_X(halfResTap0)]);
81-
float4 lowResCol1 = max(0, _LowResolutionTexture[COORD_TEXTURE2D_X(halfResTap1)]);
82-
float4 lowResCol2 = max(0, _LowResolutionTexture[COORD_TEXTURE2D_X(halfResTap2)]);
83-
float4 lowResCol3 = max(0, _LowResolutionTexture[COORD_TEXTURE2D_X(halfResTap3)]);
84-
85-
_OutputUpscaledTexture[COORD_TEXTURE2D_X(outputCoord)] = BilUpColor(hiResDepth, lowDepths, lowResCol0, lowResCol1, lowResCol2, lowResCol3);
86-
#endif
102+
float hiResDepth = LOAD_TEXTURE2D_X(_DepthTexture, currentCoord.xy).x;
103+
104+
// Tap the neighborhood data from
105+
NeighborhoodUpsampleData2x2_RGB upsampleData;
106+
int localIndex = (currentCoord.x & 1) + (currentCoord.y & 1) * 2;
107+
FillUpsampleNeighborhoodData_2x2(groupThreadId, localIndex, upsampleData);
108+
109+
// Upscale and return the result
110+
_OutputUpscaledTexture[COORD_TEXTURE2D_X(currentCoord.xy)] = BilUpColor2x2_RGB(hiResDepth, upsampleData);
87111
}

com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/BilateralUpsample.hlsl

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,3 +173,32 @@ float4 BilUpColor3x3(float highDepth, in NeighborhoodUpsampleData3x3 data)
173173
+ float4(_NoiseFilterStrength, _NoiseFilterStrength, _NoiseFilterStrength, 0.0);
174174
return WeightedSum / TotalWeight;
175175
}
176+
177+
// Due to compiler issues, it is not possible to use arrays to store the neighborhood values, we then store them in this structure
178+
struct NeighborhoodUpsampleData2x2_RGB
179+
{
180+
// Low resolution depths
181+
float4 lowDepth;
182+
183+
// The low resolution values
184+
float3 lowValue0;
185+
float3 lowValue1;
186+
float3 lowValue2;
187+
float3 lowValue3;
188+
189+
// Weights used to combine the neighborhood
190+
float4 lowWeight;
191+
};
192+
193+
// The bilateral upscale function (3x3 neighborhood)
194+
float3 BilUpColor2x2_RGB(float highDepth, in NeighborhoodUpsampleData2x2_RGB data)
195+
{
196+
float4 combinedWeights = data.lowWeight / (abs(highDepth - data.lowDepth) + _UpsampleTolerance);
197+
float TotalWeight = combinedWeights.x + combinedWeights.y + combinedWeights.z + combinedWeights.w + _NoiseFilterStrength;
198+
float3 WeightedSum = data.lowValue0.xyz * combinedWeights.x
199+
+ data.lowValue1.xyz * combinedWeights.y
200+
+ data.lowValue2.xyz * combinedWeights.z
201+
+ data.lowValue3.xyz * combinedWeights.w
202+
+ _NoiseFilterStrength;
203+
return WeightedSum / TotalWeight;
204+
}
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
using System;
2+
using UnityEngine.Experimental.Rendering;
3+
using UnityEngine.Experimental.Rendering.RenderGraphModule;
4+
5+
namespace UnityEngine.Rendering.HighDefinition
6+
{
7+
internal class BilateralUpsample
8+
{
9+
// This is the representation of the half resolution neighborhood
10+
// |-----|-----|-----|
11+
// | | | |
12+
// |-----|-----|-----|
13+
// | | | |
14+
// |-----|-----|-----|
15+
// | | | |
16+
// |-----|-----|-----|
17+
18+
// This is the representation of the full resolution neighborhood
19+
// |-----|-----|-----|
20+
// | | | |
21+
// |-----|--|--|-----|
22+
// | |--|--| |
23+
// |-----|--|--|-----|
24+
// | | | |
25+
// |-----|-----|-----|
26+
27+
// The base is centered at (0, 0) at the center of the center pixel:
28+
// The 4 full res pixels are centered {L->R, T->B} at {-0.25, -0.25}, {0.25, -0.25}
29+
// {-0.25, 0.25}, {0.25, 0.25}
30+
//
31+
// The 9 half res pixels are placed {L->R, T->B} at {-1.0, -1.0}, {0.0, -1.0}, {1.0, -1.0}
32+
// {-1.0, 0.0}, {0.0, 0.0}, {1.0, 0.0}
33+
// {-1.0, 1.0}, {0.0, 1.0}, {1.0, 1.0}
34+
35+
// Set of pre-generated weights (L->R, T->B). After experimentation, the final weighting function is exp(-distance^2)
36+
static internal float[] distanceBasedWeights_3x3 = new float[] { 0.324652f, 0.535261f, 0.119433f, 0.535261f, 0.882497f, 0.196912f, 0.119433f, 0.196912f, 0.0439369f,
37+
0.119433f, 0.535261f, 0.324652f, 0.196912f, 0.882497f, 0.535261f, 0.0439369f, 0.196912f, 0.119433f,
38+
0.119433f, 0.196912f, 0.0439369f, 0.535261f, 0.882497f, 0.196912f, 0.324652f, 0.535261f, 0.119433f,
39+
0.0439369f, 0.196912f, 0.119433f, 0.196912f, 0.882497f, 0.535261f, 0.119433f, 0.535261f, 0.324652f};
40+
41+
// Set of pre-generated weights (L->R, T->B). After experimentation, the final weighting function is exp(-distance^2)
42+
static internal float[] distanceBasedWeights_2x2 = new float[] { 0.324652f, 0.535261f, 0.535261f, 0.882497f,
43+
0.535261f, 0.324652f, 0.882497f, 0.535261f,
44+
0.535261f, 0.882497f, 0.324652f, 0.535261f,
45+
0.882497f, 0.535261f, 0.535261f, 0.324652f};
46+
47+
static internal float[] tapOffsets_2x2 = new float[] { -1.0f, -1.0f, 0.0f, -1.0f, -1.0f, 0.0f, 0.0f, 0.0f,
48+
0.0f, -1.0f, 1.0f, -1.0f, 0.0f, 0.0f, 1.0f, 0.0f,
49+
-1.0f, 0.0f, 0.0f, 0.0f, -1.0f, 1.0f, 0.0f, 1.0f,
50+
0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f};
51+
}
52+
53+
54+
[GenerateHLSL(needAccessors = false, generateCBuffer = true)]
55+
unsafe struct ShaderVariablesBilateralUpsample
56+
{
57+
// Half resolution we are up sampling from
58+
public Vector4 _HalfScreenSize;
59+
60+
// Weights used for the bilateral up sample
61+
[HLSLArray(3 * 4, typeof(Vector4))]
62+
public fixed float _DistanceBasedWeights[12 * 4];
63+
64+
// Offsets used to tap into the half resolution neighbors
65+
[HLSLArray(2 * 4, typeof(Vector4))]
66+
public fixed float _TapOffsets[8 * 4];
67+
}
68+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//
2+
// This file was automatically generated. Please don't edit by hand. Execute Editor command [ Edit > Rendering > Generate Shader Includes ] instead
3+
//
4+
5+
#ifndef BILATERALUPSAMPLEDEF_CS_HLSL
6+
#define BILATERALUPSAMPLEDEF_CS_HLSL
7+
// Generated from UnityEngine.Rendering.HighDefinition.ShaderVariablesBilateralUpsample
8+
// PackingRules = Exact
9+
CBUFFER_START(ShaderVariablesBilateralUpsample)
10+
float4 _HalfScreenSize;
11+
float4 _DistanceBasedWeights[12];
12+
float4 _TapOffsets[8];
13+
CBUFFER_END
14+
15+
16+
#endif

com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/BilateralUpsampleDef.cs.hlsl.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/BilateralUpsampleDef.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/HDRenderPipeline.ScreenSpaceGlobalIllumination.cs

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ TextureHandle TraceSSGI(RenderGraph renderGraph, HDCamera hdCamera, GlobalIllumi
217217

218218
// Output textures
219219
passData.outputBuffer = builder.WriteTexture(renderGraph.CreateTexture(new TextureDesc(Vector2.one, true, true)
220-
{ colorFormat = GraphicsFormat.R16G16B16A16_SFloat, enableRandomWrite = true, name = "SSGI Color" }));
220+
{ colorFormat = GraphicsFormat.B10G11R11_UFloatPack32, enableRandomWrite = true, name = "SSGI Color" }));
221221

222222
builder.SetRenderFunc(
223223
(TraceSSGIPassData data, RenderGraphContext ctx) =>
@@ -291,9 +291,7 @@ class UpscaleSSGIPassData
291291
public int texHeight;
292292
public int viewCount;
293293
public Vector4 halfScreenSize;
294-
295-
// Generation parameters
296-
public Vector2 firstMipOffset;
294+
public ShaderVariablesBilateralUpsample shaderVariablesBilateralUpsampleCB;
297295

298296
// Compute Shader
299297
public ComputeShader bilateralUpsampleCS;
@@ -314,10 +312,16 @@ TextureHandle UpscaleSSGI(RenderGraph renderGraph, HDCamera hdCamera, GlobalIllu
314312
passData.texWidth = hdCamera.actualWidth;
315313
passData.texHeight = hdCamera.actualHeight;
316314
passData.viewCount = hdCamera.viewCount;
317-
passData.halfScreenSize.Set(passData.texWidth / 2, passData.texHeight / 2, 1.0f / (passData.texWidth * 0.5f), 1.0f / (passData.texHeight * 0.5f));
318315

319-
// Set the generation parameters
320-
passData.firstMipOffset.Set(HDShadowUtils.Asfloat((uint)info.mipLevelOffsets[1].x), HDShadowUtils.Asfloat((uint)info.mipLevelOffsets[1].y));
316+
passData.shaderVariablesBilateralUpsampleCB._HalfScreenSize = new Vector4(passData.texWidth / 2, passData.texHeight / 2, 1.0f / (passData.texWidth * 0.5f), 1.0f / (passData.texHeight * 0.5f));
317+
unsafe
318+
{
319+
for (int i = 0; i < 16; ++i)
320+
passData.shaderVariablesBilateralUpsampleCB._DistanceBasedWeights[i] = BilateralUpsample.distanceBasedWeights_2x2[i];
321+
322+
for (int i = 0; i < 32; ++i)
323+
passData.shaderVariablesBilateralUpsampleCB._TapOffsets[i] = BilateralUpsample.tapOffsets_2x2[i];
324+
}
321325

322326
// Grab the right kernel
323327
passData.bilateralUpsampleCS = m_Asset.renderPipelineResources.shaders.bilateralUpsampleCS;
@@ -326,7 +330,7 @@ TextureHandle UpscaleSSGI(RenderGraph renderGraph, HDCamera hdCamera, GlobalIllu
326330
passData.depthTexture = builder.ReadTexture(depthPyramid);
327331
passData.inputBuffer = builder.ReadTexture(inputBuffer);
328332
passData.outputBuffer = builder.WriteTexture(renderGraph.CreateTexture(new TextureDesc(Vector2.one, true, true)
329-
{ colorFormat = GraphicsFormat.R16G16B16A16_SFloat, enableRandomWrite = true, name = "SSGI Final" }));
333+
{ colorFormat = GraphicsFormat.B10G11R11_UFloatPack32, enableRandomWrite = true, name = "SSGI Final" }));
330334

331335
builder.SetRenderFunc(
332336
(UpscaleSSGIPassData data, RenderGraphContext ctx) =>
@@ -336,9 +340,7 @@ TextureHandle UpscaleSSGI(RenderGraph renderGraph, HDCamera hdCamera, GlobalIllu
336340
int numTilesXHR = (data.texWidth + (ssgiTileSize - 1)) / ssgiTileSize;
337341
int numTilesYHR = (data.texHeight + (ssgiTileSize - 1)) / ssgiTileSize;
338342

339-
// Inject the input scalars
340-
ctx.cmd.SetComputeVectorParam(data.bilateralUpsampleCS, HDShaderIDs._HalfScreenSize, data.halfScreenSize);
341-
ctx.cmd.SetComputeVectorParam(data.bilateralUpsampleCS, HDShaderIDs._DepthPyramidFirstMipLevelOffset, data.firstMipOffset);
343+
ConstantBuffer.PushGlobal(ctx.cmd, data.shaderVariablesBilateralUpsampleCB, HDShaderIDs._ShaderVariablesBilateralUpsample);
342344

343345
// Inject all the input buffers
344346
ctx.cmd.SetComputeTextureParam(data.bilateralUpsampleCS, data.upscaleKernel, HDShaderIDs._DepthTexture, data.depthTexture);

0 commit comments

Comments
 (0)