Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Traditionally they're a black box without any assert() equivalent

Thankfully these days we have printf in shaders that you can use for "asserts". You can detect if the shader printed anything and consider it a failure.

You can even add a conditional print in your pixel shader, run your app in renderdoc and find the pixel(s) that printed something. Once you find one, you can step through it in the shader debugger.

This seemingly simple feature is a huge time saver.



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

Search: