Erfan Ahmadi.

Shaders · Math · SDF

Screen-Space Derivatives in Practice

Screen-space derivatives are built into every GPU and available in fragment shader, yet few people know how and when they should use them.

Screen-space derivatives are built into every GPU and available in fragment shader, yet few people know how and when they should use them. Here I use some cool visualizations to show how I used screen-space derivatives to solve a problem I ran into: Rendering 3D Planar Curves with SDFs.

Chapters

  • 0:00 Motivation
  • 1:02 Recap
  • 4:49 SDFs
  • 6:35 Screen-Space vs. World-Space Distances
  • 10:42 The Function to Differentiate
  • 13:00 Using Derivatives to Approximate a Function with a Plane

Find more on my YouTube channel.