How to dermine whenever fragment shader is running inside Qt 6 Shader Tools environment?
-
Good morning,
I've got an issue finding a variable in Qt 6 Shader Tools responsible for determining whenever the fragment shader (
*.frag
) is running in the Qt application / environment.I've tried using
#ifdef QSB
/#ifdef QT_VERSION
but to no avail.Is there such a thing, similar to variables like
GL_ES
/__VERSION__
?I'm compiling my shader as follows:
qsb --glsl "450" --hlsl 50 --msl 12 -o shader.frag.qsb shader.frag
-
Hello,
Unfortunately, there's no direct way to determine if your fragment shader is running within a Qt application or environment using built-in preprocessor directives or variables.
Understanding the Limitations
Shader Isolation: Shaders operate in a relatively isolated environment, with limited access to the surrounding application context.
Platform-Specific Information: Information about the application environment is typically handled at a higher level, outside the shader's scope.