[Discussion] How do you (unit-)test your shaders?
Hey all! I’ve been thinking about how to best unit-test my shader code, since TDD has been very helpful for me. But I’ve been able to find surprisingly little information. If possible, I’d love to hear from your experiences!
My current plan is to write unit tests using Sub-Viewports that each have a small wrapper shader to draw the result of the tested functions to e.g. 256x256px textures, which I can then compare against snapshots.
This could allow for assertion functions (one condition per pixel), but getting any kind of usable error messages would mean a ton of work, so I don’t think that it’d be worth it.