Support on Patreon: / techartaid
Get project files: https://techartaid.com/products/
Have you ever wondered how to shape & combine various vector shapes within a material in Unreal? Signed distance fields are the answer. What are SDFs? How to create smooth grayscale masks out of them in a shader? Popularized by font rendering in Half-Life 2 (and Unreal Engine itself!), as well as ShaderToy procedural artworks, this graphics description method has a great ratio of memory footprint to the final quality. They even come anti-aliased by default!
Code for box, rectangle, triangle shapes (mentioned in the video): https://iquilezles.org/www/articles/d...
Streaming every Wednesday at / techartaid
Chapters:
00:00 Distance-based masks in materials
07:24 Calculating a signed distance field
11:55 Ray marching explanation
14:08 How to combine multiple SDFs
20:50 Rectangle, triangle, rounded box SDFs
21:38 Implementing a heart shape