Coding Adventure: Ray Marching

Sebastian Lague · 1.2M views · 2019 · 5:06

Open on YouTube

Computer graphics & renderingGame programming & enginesexplainer

Why Game Development Stack Exchange recommends it

Game Development Stack Exchange users link it when someone wants shader effects such as merging shapes, cutting holes, or blobby intersections, since it shows signed distance fields blending objects.

Recommended by 1 people across 1 different months, 2019 to 2023.

What it is

Sebastian Lague's short Coding Adventure video explores ray marching with signed distance functions in Unity, rendering smoothly blended and fractal-like shapes. It is a visual walkthrough with linked project files and learning resources.

What people said

Recommends verified_tinker · 2019-11 · Game Development Stack Exchange · on “How can I cut a doorway through my wall at runtime?”

Shaders can definitely do this. It shouldn't even be hard. Sebastian Lague has made a video about this (among other things) that you can find here: [this video] However, I don't know how this places with colliders. I suspect you're going to have to modify that separately; but it shouldn't prove too hard.

Cites sarwin_ · 2020-09 · Game Development Stack Exchange · on “How to fuse 2 sprites as they approach each other in Unity2D?”

Hi i seen this video by Sebastian Lague on ray marching. Link: [this video] At 3:19 mins. [LINK] I want this merging effect but for 2D sprites. Please can someone instruct me on how it can be made or the steps to make it.

Cites Basic · 2023-07 · Game Development Stack Exchange · on “How to create intersection shader that simulates squishing?”

You can achieve that effect by using ray marching and signed distance fields. Not sure whether that would be a worthwhile cost for your use case... [this video]