From ed5666b88411094769b7e34ce822a49d7d37c242 Mon Sep 17 00:00:00 2001 From: Rob Cupisz Date: Tue, 13 Sep 2022 23:55:34 +0200 Subject: [PATCH] Workaround a bug on metal preventing writing to the final texture --- Runtime/MeshToSDF.compute | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Runtime/MeshToSDF.compute b/Runtime/MeshToSDF.compute index 5180da3..da633b9 100644 --- a/Runtime/MeshToSDF.compute +++ b/Runtime/MeshToSDF.compute @@ -36,7 +36,9 @@ float3 GetPos(ByteAddressBuffer vertexBuffer, uint i) #include "../_External/TressFXSDF.hlsl" -RWTexture3D _SDF; +// The texture is a half, but on metal declaring it as a half silently breaks writing +RWTexture3D _SDF; + StructuredBuffer _SDFBuffer; RWStructuredBuffer _SDFBufferRW;