Forum

    • Register
    • Login
    • Search
    • Categories

    Shader not working anymore?

    Bug Reports
    2
    3
    111
    Loading More Posts
    • 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.
    • ustk
      ustk last edited by ustk

      @Christoph-Hart

      Shader from the doc:

      void mainImage( out vec4 fragColor, in vec2 fragCoord )
      {
          // Normalized pixel coordinates (from 0 to 1)
          vec2 uv = fragCoord/iResolution.xy;
      
          // Time varying pixel color
          vec3 col = 0.5 + 0.5*cos(iTime+uv.xyx+vec3(0,2,4));
      
          // Output to screen
          fragColor = vec4(col,1.0);
      }
      
      Interface:! ERROR: 0:0: '' : syntax error: #line{GLSL::Interface::bgShader2}
      Interface:! ERROR: 0:1: '(' : syntax error: syntax error{GLSL::Interface::bgShader2}
      

      Use Open GL is enabled

      Screenshot 2023-01-14 at 16.50.59.png

      I cannot help pressing F5 in the forum...
      Studio427 Audio - Audio Instruments & FX Plugins for music production. Website - Facebook

      Christoph Hart 1 Reply Last reply Reply Quote 0
      • Christoph Hart
        Christoph Hart @ustk last edited by

        @ustk Where in the docs? It's using a wrong syntax, you need to define the main function without parameters:

        void main()
        {
            // Normalized pixel coordinates (from 0 to 1)
            vec2 uv = fragCoord/iResolution.xy;
        
            // Time varying pixel color
            vec3 col = 0.5 + 0.5*cos(iTime+uv.xyx+vec3(0,2,4));
        
            // Output to screen
            fragColor = pixelAlpha * vec4(col,1.0);
        }
        
        ustk 1 Reply Last reply Reply Quote 0
        • ustk
          ustk @Christoph Hart last edited by ustk

          @Christoph-Hart Oh yes my bad, actually I'm using the good syntax inside the project and it does not work for me, neither my old shader despite it was working before...

          I cannot help pressing F5 in the forum...
          Studio427 Audio - Audio Instruments & FX Plugins for music production. Website - Facebook

          1 Reply Last reply Reply Quote 0
          • First post
            Last post

          3
          Online

          977
          Users

          6.6k
          Topics

          60.6k
          Posts