Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
// Marching Cubes on the GPU adapted from
// https://github.com/Scrawk/Marching-Cubes-On-The-GPU
// MIT licensed, see LICENSE file in the enclosing folder.
// Each #kernel tells which function to compile; you can have many kernels
#pragma kernel CSMain
// Create a RenderTexture with enableRandomWrite flag and set it
// with cs.SetTexture
RWTexture2D<float4> Result;
[numthreads(8,8,1)]
void CSMain (uint3 id : SV_DispatchThreadID)
{
// TODO: insert actual code here!
Result[id.xy] = float4(id.x & id.y, (id.x & 15)/15.0, (id.y & 15)/15.0, 0.0);
}
f6b8e5137This file is pinned to the selected release. Download the original to open it in your design tool.