HISE Logo Forum
    • Categories
    • Register
    • Login

    I'll just leave this here...

    Scheduled Pinned Locked Moved General Questions
    106 Posts 16 Posters 9.8k 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.
    • Christoph HartC
      Christoph Hart
      last edited by

      I haven鈥榯 tested it on macOS yet, so maybe something鈥榮 off there. I鈥榣l 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鈥榬e 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鈥檚 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鈥檚 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鈥榣l 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鈥榣l 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
                                • ?
                                  A Former User @Christoph Hart
                                  last edited by A Former User

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

                                  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.

                                  I'll do some more digging... Maybe also try a few of the other, simple examples on shadertoy...

                                  This one's new:
                                  Screenshot 2021-06-05 at 21.56.21.png

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

                                    Nah, it's something around the glue code that I have to add in order to make it work, so any example will cause the same error.

                                    I will have to check again thoroughly on Monday, but what macOS version and GPU are you using?

                                    ? 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...:

                                      Nah, it's something around the glue code that I have to add in order to make it work, so any example will cause the same error.

                                      I will have to check again thoroughly on Monday, but what macOS version and GPU are you using?

                                      macOS Catalina 10.15., MacPro 2019 (3.2 GHz 16-Core Intel Xeon W) with an AMD Radeon Pro 580X 8 GB card

                                      1 Reply Last reply Reply Quote 0
                                      • Dominik MayerD
                                        Dominik Mayer
                                        last edited by Dominik Mayer

                                        I'll leave this HISE snippet here for a quickstart into GLSL with HISE: (requires the latest scriptnode_codegen_rewrite branch)

                                        HiseSnippet 954.3ocsV01aaSDG+bZLrXHSLI9.XkW4HUxbfsARSSj17vVzZSsl2JHgPcWsuDepmuyx97FQSUhOZ7J97v2.3+4yN1EbKn.Dk27+4e+e7rWpHfjkIRQF8d81DBx3SM82xkQSivTNZ4Ljw8MOEmIIo1ZVGuMAmkQBQFFG7bECidcQE+9su8XLCyCH0rPnyEz.xIzXprlq2jWRYrE3PxqowMz9QSVFH3SELQNfmCLcQI3fqvaHqvJ05XhL9n4gToH0WhkjLjQ2iEga8iDumq0+bZF8RFQQLF4CNRydgfEpPrhKZZDkE5Uk2YHvKd0UgCzUgO27TZHcG+5pwmUHvt1hl0CiN2E7F2DdtsBO21fmQC30UCuGX5GjRSj0RTX6SLWxgF0ZLzBZBKstnN+ZGyoBPCtbTL9JxhTfXmENOw08P6G65N7o8s5aAMhLo86vo1dXNgM19Y1U1tgHmJhSDbfvYfV7.kU01jEAM2zF1DjRfRheAamAZwCzQ5gOTSNJiHOlQ3gKx4ANxzbxgk9YzyO4B+WM8hiNw6EGY2j6YqlqcReKMNTNwC5UxWIxkTNwYM3LIUvc1Lru0G5a0ayHbRBaaITzt5P6e.xc3uLhloxuuiFJibFVy3ED5lHoyveTEtqqhYcB+Rt3xauFUHsHcobFfJ6JTYK3ExTlkJXNAU1bH3UVNoDy0En2voqEowyvRryf3smqTZPkxJnUfr6DEJ2TFuoXF6RXEy4lvPmdMv3JgjbF2Yn0Gr5Ycsk8eVz50sJqzcLnN2lX0xe5cYnCOO9RU2QmdUJBaA2bMy71WyZdEHPWUZnnfujSkmkP321sATYoTsFVhJPUYwR38KWB8YTn6fnvt1GaVTGQE.t4kQzaVp5YUtA7HDkDRpjpR.iYj2AmI0618LmQxtRJRfKd65dvkOcP6Ws4qF2Kh48L0i9neZW.+4US1VG8YSduZbdGie45IQEiy6371zInFgp6ea9UGJTyP4kOA8WOVAmLEg4Lr7l2QUOdTJ.5523fk5nDOiJ21rD9u93Zq82+gv8AldTYPT63sSK3E5z+ei2xmp5aNe8ZRfrFrcMW78+29tTqPQehcyoXYJEFHLWkG6CubGP.jvgIR0loQG0Njl1UQqpL9vQ9BheG9UJbrh1nT33JgnXbPp3h.8lm5wv6UvAvDu3aB5AebBPauakyzzcjKJFdi9hf.Uo3K.r2tMe4dXyWsG17n8vlGuG17j8vludOr4atSaTedzQ4RQrdMAX3Mu3zmgwbNFlxJlHQ+APSk4ct
                                        

                                        The new shader.glsl file will get created in the the Scripts folder of your project. Now it has to be filled with some content to make it work: Gladly Chris has introduced a new shortcut to directly access the .glsl file in HISE. Click the "onInit"-callback dropdown on the top of the Code Editor to open the file directly in the Code-editor, paste this snippet and compile [f5].

                                        uniform float myValue;
                                        
                                        void main()
                                        {
                                            // Normalized pixel coordinates (from 0 to 1)
                                            vec2 uv = fragCoord/iResolution.xy;
                                        
                                            // Time varying pixel color
                                            vec3 col = myValue * sin(uv.xyx+vec3(1,2,3));
                                        
                                            // Output to screen
                                            fragColor = pixelAlpha * vec4(col, 1);
                                        }
                                        

                                        Happy journey :)

                                        ? 1 Reply Last reply Reply Quote 2
                                        • ?
                                          A Former User @Dominik Mayer
                                          last edited by A Former User

                                          @Dominik-Mayer Thanks for this Dominik. I tried your snippet but my interface still returns an unknown error! Are you on Mac or Windows?

                                          EDIT: Thinks for the myValue inclusion in your script. That was a question I actually had! 馃檹

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

                                            Hmm, I'm at the end of my options to figure out why it's not working on your end - I just checked and it works on my mac mini which has an ancient GPU and shader version.

                                            A last thing you can do is to download and compile the JUCE OpenGL 2d demo app here:

                                            Link Preview Image
                                            JUCE/examples/GUI/OpenGLDemo2D.h at master 路 juce-framework/JUCE

                                            JUCE is an open-source cross-platform C++ application framework for desktop and mobile applications, including VST, VST3, AU, AUv3, LV2 and AAX audio plug-ins. - JUCE/examples/GUI/OpenGLDemo2D.h at master 路 juce-framework/JUCE

                                            favicon

                                            GitHub (github.com)

                                            And see if these minimal shaders work.

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

                                            23

                                            Online

                                            1.7k

                                            Users

                                            11.8k

                                            Topics

                                            102.4k

                                            Posts