|
|
|
|
|
|
|
|
1
|
// # Rendering Signed Distance Functions with WebGL
|
|
|
|
2
|
//
|
|
|
|
3
|
// Yes, you can do this in Shadertoy, but this is how you can do it from scratch.
|
|
|
|
4
|
// (It also loads a lot faster.)
|
|
|
|
5
|
//
|
|
|
|
6
|
// Use it by opening the Scratchpad in Firefox and evaluate the code with `Ctrl-R`
|
|
|
|
7
|
// to rerender. Including via `<script>` should also work.
|
|
|
|
8
|
//
|
|
1
|
// # Resources
|
9
|
// # Resources
|
|
2
|
//
|
10
|
//
|
|
3
|
// - [Raw WebGL](http://nickdesaulniers.github.io/RawWebGL) ([video](https://www.youtube.com/watch?v=H4c8t6myAWU))
|
11
|
// - [Raw WebGL](http://nickdesaulniers.github.io/RawWebGL) ([video](https://www.youtube.com/watch?v=H4c8t6myAWU))
|