Compute shader debugger
I've took a break from programming and now I am back; SHADERed development continues. Today I am releasing a small update with somewhat big features. Here's what's new in this update:
Up until now you could only debug pixel and vertex shaders in SHADERed. Today I am expanding that list by adding support for debugging compute shaders.
The debugger executes other threads in the workgroup only when necessary and synchronizes the memory between the threads. This means that functions such as atomicAdd, barrier, etc... (and their HLSL counterparts) should work in the debugger as they would on the GPU.
To start debugging the compute shader you can either right click on the ComputePass object -> Debug -> enter the thread ID or you can initiate the compute shader debugger through the newly added suggestion feature in the "Pixel Inspect" window.
"Vector watch" window is a new addition to the debugger's toolset - it allows you to visualize expressions and variables in 3D space. It's a step towards making the debugger more useful. I plan to add similar features to the debugger in the future.
You can check the documentation to see how to use this new feature.
The Lite version of SHADERed has no new features and is still stuck at v1.3.6 . Though, I've updated the .wasm files - I've compiled SHADERed Lite with size optimization flags. The web version of IDE is now 4x times smaller then before so it should probably load faster.
With the Lite version you can create your own shaders and upload them to the website (you have to create an account).
The first person camera can now move faster around the scene - just hold the SHIFT key while moving.
You can paste full file path in the file dialog's textbox.
There are also some other changes and fixes which you can check out in the changelog.
These new features in SHADERed required some improvments in the SPIRV-VM library (the engine behind SHADERed's debugger). SPIRV-VM now supports atomic operations and handles the Workgroup memory differently. SPIRV-VM calls a callback function each time the shader writes to the workgroup memory or when an atomic operation is reached. It's up to the user to properly handle storing and writing to shared memory though.
I'd like to thank DigitalOcean for sponsoring SHADERed. Thanks to them, SHADERed's web servers will keep running for a long time. I highly recommend their services.