Skip to content

Instantly share code, notes, and snippets.

@adammyhre
adammyhre / HeatmapCompute.compute
Last active April 13, 2025 18:14
Compute Shader + Render Feature Heatmap
#pragma kernel CSMain
RWTexture2D<float> heatmapTexture;
float2 texSize;
StructuredBuffer<float2> enemyPositions;
int enemyCount;
[numthreads(8, 8, 1)]
void CSMain(uint3 id : SV_DispatchThreadID)