4 ms·
Signed Distance Functions: Modeling in Math (2023)
- peter_d_sherman 3y agoRelated: Leveraging Rust and the GPU to render user interfaces at 120 FPS: https://zed.dev/blog/videogame https://zed.dev/blog/videogame >"To understand how drawing rectangles works in GPUI, we first need to take a detour into the concept of Signed Distance Functions (SDFs for short). As implied by the name, an SDF is a function that, given an input position, returns the distance to the edge of some mathematically-defined object. The distance approaches zero as the position gets closer to the object, and becomes negative when stepping inside its boundaries." https://en.wikipedia.org/wiki/Signed_distance_function https://en.wikipedia.org/wiki/Signed_distance_function