The Magic of Signed Distance Functions (Unity Shader Tutorial)




Wishlist Surgebound: https://store.steampowered.com/app/3489880/Surgebound/ Show your Support & Get Exclusive Benefits on Patreon (as well as the robust SDF system i setup that was showcased in this video): https://www.patreon.com/sasquatchbgames Join our Discord Community! - https://discord.com/invite/aHjTSBz3jH -- I've gone down a DEEP rabbit hole the last couple weeks with signed distance functions. I built an entire system to help me create procedural UI in my game, and thought it was such a cool concept that I wanted to show you guys how you can get started with it as well! I hope you enjoy! -- Timestamps: 00:00 - What is an SDF 02:08 - Creating an HLSL file and our first function 03:00 - Creating a circle SDF in shadergraph 05:43 - Adding an OUTLINE to our shapes in shadergraph 08:06 - Creating a rectangle SDF in shadergraph 09:53 - Adding an INLINE to our shapes in shadergraph 12:21 - Adding corner rounding to our rectangle 13:19 - Adding a UNION intersection for our SDF 15:50 - Adding SMOOTHING, INTERSECTION, and DIFFERENCE operations 18:43 - More SDF resources --- SDF functions: https://iquilezles.org/articles/distfunctions2d/ --- In need of more Unity Assets? Using our affiliate link is a great way to support us. We get a small cut that helps keep us up and running: https://assetstore.unity.com/?aid=1100lwgBQ --- Looking for some awesome Gamedev merch? - https://sasquatchbgames.myspreadshop.com/ --- Link to Download our FREE 2D Asset Pack: https://assetpack.sasquatchbstudios.com/ Who We Are------------------------------------- If you're new to our channel, we're Brandon & Nikki from Sasquatch B Studios. We sold our house to start our game studio, and work full time on building our business and making games Don't forget to Subscribe for NEW game dev videos every week! Cropolution is now out on Steam! https://store.steampowered.com/app/3291660/Cropolution/ Follow us on Twitter https://twitter.com/SasquatchBGames #unitytutorial #unity2d #madewithunity

© Copyright 2025 Indie Dev Channels
Content Directory