Godot 4: Shader debugging (tutorial)

in #godot2 days ago

Hi everyone! I think every shader developer has at some point found themselves in a situation where they needed to determine certain values in the fragment function, especially when the shader wasn't behaving as expected. The problem is that the shader runs on the GPU, so we don't have anything like an output console available. So, how can we solve that? There are some options, and I’ll demonstrate one of them in this tutorial.