HISE Logo Forum
    • Categories
    • Register
    • Login

    Shader not working anymore?

    Scheduled Pinned Locked Moved Bug Reports
    3 Posts 2 Posters 244 Views
    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.
    • ustkU
      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

      Can't help pressing F5 in the forum...

      Christoph HartC 1 Reply Last reply Reply Quote 0
      • Christoph HartC
        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);
        }
        
        ustkU 1 Reply Last reply Reply Quote 0
        • ustkU
          ustk @Christoph Hart
          last edited by ustk

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

          Can't help pressing F5 in the forum...

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

          53

          Online

          1.7k

          Users

          11.7k

          Topics

          101.8k

          Posts