HISE Logo Forum
    • Categories
    • Register
    • Login

    I'll just leave this here...

    Scheduled Pinned Locked Moved General Questions
    106 Posts 16 Posters 10.0k 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.
    • ?
      A Former User @Christoph Hart
      last edited by

      @Christoph-Hart That makes sense. I’ll give it a go tonight...

      1 Reply Last reply Reply Quote 0
      • ?
        A Former User @Christoph Hart
        last edited by

        @Christoph-Hart So... I am obviously missing something...
        The shader.glsl script sits in the right column under my onControl Callback and in the script folder... OpenGL is enabled in the Settings, flag set for plugin (if needed)...

        Content.makeFrontInterface(600, 500);
        
        const var pnlShader = Content.getComponent("pnlShader");
        
        const var shader = Content.createShader("shader");
        
        //shader.setBlendFunc(true, shader.GL_ONE, shader.GL_ONE);
        
        
        pnlShader.setPaintRoutine(function(g)
        {
        	g.applyShader("shader", [0, 0, this.getWidth(), this.getHeight()]);
            
        });
        
        
        
        1 Reply Last reply Reply Quote 0
        • Christoph HartC
          Christoph Hart
          last edited by

          Are there any compile errors in the console? What's the shader code?

          ? 1 Reply Last reply Reply Quote 0
          • ?
            A Former User @Christoph Hart
            last edited by A Former User

            @Christoph-Hart It compiles without errors and the shader code is the example code in the docs:

            void main() // must be named `main()` without parameters
            {
                // 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);
            }
            
            
            1 Reply Last reply Reply Quote 0
            • Christoph HartC
              Christoph Hart
              last edited by

              Are you on Windows or mac?

              This shader stuff is beyond awesome. Check out this 3D keyboard prototype:

              3dkeyboard.gif

              ? 1 Reply Last reply Reply Quote 10
              • ?
                A Former User @Christoph Hart
                last edited by

                @Christoph-Hart Ok. This is killing me!!! Why doesn't it work on my system! You have to drop me a bone I can gnaw on a bit at least... Do you have any idea why it isn't working? Beacuse this looks just crazy awesome!! And on a scale of 1 to 10, how unwise is it to start working on the codegen rewrite branch if I plan to release a plugin by the end of the year?

                1 Reply Last reply Reply Quote 1
                • Christoph HartC
                  Christoph Hart
                  last edited by

                  I haven‘t tested it on macOS yet, so maybe something‘s off there. I‘ll take a look later this day.

                  And yes you can definitely use the latest branch for a project that will be published in a few months - this branch is likely to be the master branch by then. Its just risky to switch an existing project to the newest branch (especially if you‘re using the old scriptnode stuff).

                  ? 1 Reply Last reply Reply Quote 2
                  • ?
                    A Former User @Christoph Hart
                    last edited by A Former User

                    @Christoph-Hart Hey Christoph. Awesome. Thank you! Well, no scriptnode so far. It’s on the to-do list. I was busy working on a granular processor and an Euclidean Sequencer... so... I might just risk it...

                    1 Reply Last reply Reply Quote 1
                    • Christoph HartC
                      Christoph Hart
                      last edited by

                      Please check again, I noticed that Intel HD graphic cards do not support the #line directive, so I deactivated this.

                      ? 1 Reply Last reply Reply Quote 0
                      • ?
                        A Former User @Christoph Hart
                        last edited by

                        @Christoph-Hart No luck so far... 🙁 I was already getting excited!

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

                          I added a getOpenGLStatistics method to the shader class - it needs to render the shader once before it returns something useful though, so you need to add it after the applyShader function in the paint routine (and the script panel needs to be visible on the screen):

                          g.applyShader(shader, [0, 0, this.getWidth(), this.getHeight()]);
                          Console.print(shader.getOpenGLStatistics()));
                          

                          Can you post the output, maybe this will give a glue.

                          ? 1 Reply Last reply Reply Quote 0
                          • ?
                            A Former User @Christoph Hart
                            last edited by

                            @Christoph-Hart said in I'll just leave this here...:

                            I added a getOpenGLStatistics method to the shader class - it needs to render the shader once before it returns something useful though, so you need to add it after the applyShader function in the paint routine (and the script panel needs to be visible on the screen):

                            g.applyShader(shader, [0, 0, this.getWidth(), this.getHeight()]);
                            Console.print(shader.getOpenGLStatistics()));
                            

                            Can you post the output, maybe this will give a glue.

                            I put the getOpenGLStatistics after the applyShader line as instructed.

                            Now. The output seems to be a bit inconsistent... I get this normally:

                            Screenshot 2021-06-05 at 14.45.02.png

                            then occasionally, after hitting compile a few more times, I do get the following:

                            Screenshot 2021-06-05 at 14.45.32.png

                            Christoph HartC 1 Reply Last reply Reply Quote 0
                            • lalalandsynthL
                              lalalandsynth
                              last edited by

                              hmm, can anyone explain what this is ? How can I make graphics using this ? 🐖

                              https://lalalandaudio.com/

                              https://lalalandsynth.com/

                              https://www.facebook.com/lalalandsynth

                              https://www.facebook.com/lalalandsynth

                              ? 1 Reply Last reply Reply Quote 0
                              • ?
                                A Former User @lalalandsynth
                                last edited by

                                @lalalandsynth Have a look at the Art of Code YouTube channel... link in docs! It’s not yet working on my system but that channel shows off some impressive stuff you can make with shader code!

                                1 Reply Last reply Reply Quote 0
                                • Christoph HartC
                                  Christoph Hart @A Former User
                                  last edited by

                                  Ah that gl_fc stuff is helpful - I had it myself on macOS. I‘ll push a fix in a few hours...

                                  ? 2 Replies Last reply Reply Quote 0
                                  • ?
                                    A Former User @Christoph Hart
                                    last edited by

                                    @Christoph-Hart 🥳🥳🥳

                                    1 Reply Last reply Reply Quote 0
                                    • ?
                                      A Former User @Christoph Hart
                                      last edited by

                                      @Christoph-Hart said in I'll just leave this here...:

                                      Ah that gl_fc stuff is helpful - I had it myself on macOS. I‘ll push a fix in a few hours...

                                      Also this one is joining the party:
                                      Interface:! ERROR: 0:16: '}' : syntax error: syntax error

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

                                        Can you try again, I just pushed a fix for the first compile error - I think it should fix the other one too.

                                        ? 1 Reply Last reply Reply Quote 0
                                        • ?
                                          A Former User @Christoph Hart
                                          last edited by

                                          @Christoph-Hart I just pulled and compiled... but still get those lines back...

                                          Screenshot 2021-06-05 at 19.47.14.png

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

                                            Damn that's a sticky one.

                                            Don't bother about the Line 12 errors, they're just a follow up from the other stuff. Are there any other error messages popping up? For some reason the GLSL language is less standardized than I hoped it would be, so these macOS shenanigans are super annoying.

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

                                            38

                                            Online

                                            1.7k

                                            Users

                                            11.8k

                                            Topics

                                            103.0k

                                            Posts