Yes, you do need a GUI display (IE logged into KDE) to compile, you can’t do it if you’re just SSH’d into a shell for instance. For whatever reason shader_builder opens a tiny little window briefly so it needs an X environment.
If you’re trying to do this remote via SSH, if the workstation is sitting there logged into KDE as a user or even sitting at the login window, try doing:
env DISPLAY=:0 ./shader_builder -m -x ~/glsl/shader.glsl
and see if that works.