Unity SDF generator and SDFs smooth
Drag SDF_Generator.cs
anywhere you want.
And then you can find it here: Windows > SDF Generator
-
Drag all the textures to
Sources
. Remember to set the textures toRead/Write
. -
If
samples
is0
, you will get a completely smooth output, otherwise the output is posterized according to thesamples
. -
Texture with smaller white area should be on top.
-
I drew some pictures for this tool, if you are interested, you can find them here:
images/Demo/
Try it and have fun !
- Compute shader based version
- Shader based version
- Add editor
⚠️ RWTexture2D or RWTexture2DArray doesn't work in Editor Mode ?
Ref: