WuhuIslandTesting/Library/PackageCache/com.unity.render-pipelines.universal@8148.0.7-4/Shaders/Volumetrics/Clear3DTex.compute
2025-01-07 02:06:59 +01:00

17 lines
411 B
Text

// Each #kernel tells which function to compile; you can have many kernels
#pragma kernel Clear3D
// Create a RenderTexture with enableRandomWrite flag and set it
// with cs.SetTexture
RWTexture3D<half4> _Source;
uint4 _SourceDim;
half4 _ClearColor;
[numthreads(4,4,4)]
void Clear3D (uint3 id : SV_DispatchThreadID)
{
if (all(id.xyz < _SourceDim.xyz))
{
_Source[id.xyz] = _ClearColor;
}
}