a 2d sdf-based renderer written in rust using wgpu
== project on ice. ==
When you are learning wgpu you might find src/dumb_errors.md helpful
- able to draw circles
- image fills kindof (very broken)
- all sorts of behind the scenes stuff,
- safe wrappers around storage buffers, texture atlas etc. You can find them inthe wburrito module. The storage buffer wrappers use a version of vger's GPUVec that has been modified to use encase to ensure correct memory layout. the texture atlas version uses guillotiere
- create 2d renderer
- shapes ⚫(✅)
- paths (likely similar to vger or like described in the text rendering articles)
- images
- blur
- encoding as a tree ✅
- text rendering probably using one of these techniques:
- antialiasing
- learn about rendering ✅✅✅
- finding ways to improve experience with wgpu and to help newcomers (✅)
Dust Renderer was going for what Raph Levien calls the "shader toy approach", meaning the threads don't communicate, they just compute their color from the underlying data.
The dust renderer uses Signed Distance Fields. (I'm not going to be the ten thousandth person gushing about how good they are and showing cool gifs. You can find all of that online. they're pretty cool though)
-
we don't need any vertices
-
=> compute shader is basically fragment shader that fills the whole screen
-
encoding the scene as a tree is only possible with storage buffers and one draw call. we need encoding as a tree to allow for more complex clipping and blurring.
-
being able to pipe the resulting texture into other renderers like with bevy_vello
I see now that it could have been possible to do it in the traditional pipeline, except for the last point.
I might return to this in the future if I see more value in doing this and have the ressources to do it.
- graphics programming is hard. To get to this point, it took me over half a year. I learned a lot, for sure, but it is very little what you get for a lot of hard work and bug fixing
- Vello is now released and pretty much usable
- I have a lot to do
Images in src/ are "Visual developments for Episode 39" by David Revoy