This commit is contained in:
CortexCore
2024-11-03 16:42:23 +08:00
commit b125894cc3
5904 changed files with 1070129 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
int resolution;
Texture2D<float> rtDepth;
RWStructuredBuffer<float> heightBuffer;
float distance;
float captureHeight;
int direction;
[numthreads(8,8,1)]
#pragma kernel CSMain
void CSMain (uint2 id : SV_DispatchThreadID)
{
heightBuffer[id.x + (id.y * resolution)] = captureHeight + (((1 - rtDepth[id]) * distance) * direction);
}