Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. How to dermine whenever fragment shader is running inside Qt 6 Shader Tools environment?
Forum Update on Monday, May 27th 2025

How to dermine whenever fragment shader is running inside Qt 6 Shader Tools environment?

Scheduled Pinned Locked Moved Unsolved Qt 6
2 Posts 2 Posters 333 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    GamePlayer-8
    wrote on 29 May 2024, 08:43 last edited by
    #1

    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
    
    1 Reply Last reply
    0
    • M Offline
      M Offline
      michele123
      wrote on 14 Aug 2024, 06:12 last edited by
      #2

      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.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved