Hacker News new | past | comments | ask | show | jobs | submit login

I work largely with shaders and I often debug things by encoding debug information into r, g, b. Though I can't encode very much at a time because I'm colour blind (deuteranomaly) so I usually try to avoid using both the r and g channel.

But most of the time it's more a matter of thinking things through an extra time rather than poring over debug prints.

When thinking things through and drawing debug info as colours both fail I usually load up a graphics debugger such as RenderDoc. You might think that wasn't an option here, but if I were to develop something this intricate for Shadertoy I'd definitely develop it as a standalone app in regular OpenGL first and then port it.




That is my approach as well, or using native tools like GeekXLab (https://geeks3d.com/geexlab).

Unfortunely good debuging tools for 3D Web API isn't a priority even after 10 years, and same applies to WebGPU roadmap.


Luckily for me I work exclusively with game development for PC and consoles. The console manufacturers have their own platform specific debugging tools, for PC there's Nvidia NSight and RenderDoc. Also, I mainly work with Unity these days and for many simpler tasks their own debugging and profiling tools are quite sufficient.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: