HISE Logo Forum
    • Categories
    • Register
    • Login

    [SOLVED] Shader instant crash of binary

    Scheduled Pinned Locked Moved Bug Reports
    2 Posts 1 Posters 223 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

      After a day testing this, I can't seem to get my shaders to work outside Hise for my main project despite that it works in a basic one with just a panel to render the same shader.
      But impossible to make it work in my main project despite I use the exact same configuration (glsl file, panel script, Hise settings, HISE_USE_OPENGL_FOR_PLUGIN=1)
      I tested with both basic and advanced shaders and the same thing always happens:
      Basic project => OK
      Main project => crash

      Script:

      const var GL_Pnl = Content.getComponent("GL_Pnl");
      const var shader = Content.createShader("test2");
      
      
      GL_Pnl.setPaintRoutine(function(g)
      {
      	g.applyShader(shader, this.getLocalBounds(0.0));
      });
      
      
      GL_Pnl.setTimerCallback(function()
      {
      	this.repaint();
      });
      GL_Pnl.startTimer(30);
      

      Shader:

      void main()
      {
          vec2 uv = fragCoord/iResolution.xy;
      
          vec3 col = 0.5 + 0.5*cos(iTime+uv.xyx+vec3(0,2,4));
      
          fragColor = pixelAlpha * vec4(col,1.0);
      }
      

      Debug:

      Screenshot 2022-04-07 at 20.14.52.png

      The following looks good though because I get the same thing in the other working project:

      Audio Driver Default Initialisation
      2022-04-07 23:34:39.857797+0200 S427 Control Center Debug[16875:6054768] [plugin] AddInstanceForFactory: No factory registered for id <CFUUID 0x600000284e60> F8BB1C28-BAE8-11D6-9C31-00039315CD46
      2022-04-07 23:34:39.900182+0200 S427 Control Center Debug[16875:6054768]  HALC_ShellDriverPlugIn::Open: Can't get a pointer to the Open routine
      2022-04-07 23:34:39.900802+0200 S427 Control Center Debug[16875:6054768]  HALC_ShellDriverPlugIn::Open: Can't get a pointer to the Open routine
      2022-04-07 23:34:39.901301+0200 S427 Control Center Debug[16875:6054768]  HALC_ShellDriverPlugIn::Open: Can't get a pointer to the Open routine
      2022-04-07 23:34:41.192131+0200 S427 Control Center Debug[16875:6054768] Metal API Validation Enabled
      

      So what the heck could cause this in a project but not in another one?
      I should mention that the project in question is a product manager, so there's no specific loading time involved or audio modules, just UI and scripts... I also commented out everything but the GL panel.

      Also, is there a reason the GLSL version is as old as 1.20 from 2006? the actual version is 4.6, quite a jump... @Christoph-Hart ?

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

      1 Reply Last reply Reply Quote 0
      • ustkU
        ustk
        last edited by

        You won't believe it! I've been trapped again on the "forbidden words" road!
        My project is called "Control Center", and that was the issue
        I just removed the space in the project name settings, and it works... 😰

        So "Control" seems to cause issues when the app runs with OpenGL, and back in the days I had a similar issue because my plugin was named "System". I see that these names are somewhat clause to machine-reserved stuff, but I'm not asking for special chars, "Return true", or "?/:;#'" kind of names either 🙄

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

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

        27

        Online

        1.8k

        Users

        12.1k

        Topics

        104.9k

        Posts