HISE Logo Forum
    • Categories
    • Register
    • Login

    OpenGL shader is not working in 4.0.0

    Scheduled Pinned Locked Moved Bug Reports
    18 Posts 6 Posters 1.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.
    • Gabor.KG
      Gabor.K @aaronventure
      last edited by

      Thanks @aaronventure ! The intereting point is that my plugin worked properly with HISE 3.6.2, and I could export it, and use as a plugin on my Mac. Now I can't.

      d.healeyD 1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey @Gabor.K
        last edited by

        @Gabor-K Does it work now if you export it again from the previous version?

        Libre Wave - Freedom respecting instruments and effects
        My Patreon - HISE tutorials
        YouTube Channel - Public HISE tutorials

        Gabor.KG 1 Reply Last reply Reply Quote 0
        • Gabor.KG
          Gabor.K @d.healey
          last edited by

          @d-healey I just exported it again from 3.6.2, and it still works fine.

          Christoph HartC 1 Reply Last reply Reply Quote 0
          • Christoph HartC
            Christoph Hart @Gabor.K
            last edited by

            @Gabor-K OpenGL shaders is a very volatile system and whether it works correctly depends on many different factors.

            Do the OpenGL examples from the snippet browser run on your system?

            Gabor.KG 1 Reply Last reply Reply Quote 0
            • Gabor.KG
              Gabor.K @Christoph Hart
              last edited by

              @Christoph-Hart
              I tried the Morphball snippet, and it works fine in HISE (Morphball is showing up, and reacts to the sound), but not in the exported plugin (only the keyboard is visible at the bottom).

              Gabor.KG 1 Reply Last reply Reply Quote 0
              • Gabor.KG
                Gabor.K @Gabor.K
                last edited by

                Is there anyone who works with shaders in HISE 4.0.0? If yes, at least I would know that I have some problems with my setup.
                If someone is working with shaders, is there anything special in making it work besides enabling OpenGL?

                Thanks in advance!

                ustkU 1 Reply Last reply Reply Quote 0
                • ustkU
                  ustk @Gabor.K
                  last edited by

                  @Gabor-K I was using it on mac but I stopped. It wasn't working anymore and the performances weren't what I expected. In the end even when enabling the flag it simply didn't worked so I dropped it all...

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

                  Christoph HartC Gabor.KG 2 Replies Last reply Reply Quote 0
                  • Christoph HartC
                    Christoph Hart @ustk
                    last edited by

                    Actually I noticed that there's an issue with the embedding of the shader code when exporting the plugin.

                    I'll take a look at it later, but I also second @ustk's experience, in the end OpenGL is too brittle (especially macOS) to work reliably. If it's for a nice-to-have eye candy add on then go for it, but I wouldn't recommend using it as a core feature of your interface (anymore).

                    1 Reply Last reply Reply Quote 0
                    • Gabor.KG
                      Gabor.K @ustk
                      last edited by

                      Thanks @ustk and @Christoph-Hart !

                      Yeah it would be definitely just an eye candy. We already designed the GUI of our product to have that in 3.6.2, and comitted to it, so we would stick to that whenever it is possible in version 4.0.0 as well.

                      @Christoph-Hart Please let me know when you could take a look, your help would be greatly appreciated. :folded_hands:

                      Christoph HartC 1 Reply Last reply Reply Quote 0
                      • Christoph HartC
                        Christoph Hart @Gabor.K
                        last edited by

                        @Gabor-K sure. I think I broke it when reworking the handling of external files to be included in HiseSnippets a few months ago, so thanks for the heads up. I'll let you know when it's fixed.

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

                          Alright, I checked again on my studio mac and the Morph Ball example does work in the compiled plugin, so it's not an issue of the file system. However there are a few pitfalls:

                          1. Since the example snippet is embedding the GLSL file, it will not be written to disk so if you copy over the example as is and then export your project as plugin / standalone app, it will not contain the file content and the shader will appear empty. In order to make it work, you have to explicitely copy over the embedded files (using File -> Copy embedded files to project folder), then load the snippet and export
                          2. You also have to enable OpenGL in the GeneralSettings.xml file (or through something on your interface that enables OpenGL). If I do these two things then it shows up properly (both on Windows and macOS).

                          Can you make a test project with only that shader of yours that causes the problem and see if it compiles, if not, then send it to me and I'll check. I haven't changed too much on the internals of the shaders so I wouldn't know what might be the issue until I can debug it, but if it worked with 3.6.2 we'll get it working again.

                          Gabor.KG 1 Reply Last reply Reply Quote 0
                          • Gabor.KG
                            Gabor.K @Christoph Hart
                            last edited by

                            Thanks @Christoph-Hart !

                            I went through your points and everything seems to be working well now, even the shader we use in our plugin! I'm not 100% sure what made it work, as OpenGL was already enabled in the GeneralSettings.xml file, but everything is running smoothly now.

                            Thanks again for your time!

                            Christoph HartC 1 Reply Last reply Reply Quote 0
                            • Christoph HartC
                              Christoph Hart @Gabor.K
                              last edited by

                              @Gabor-K haha that‘s always the least satisfying fix :)

                              But it goes to show how fragile Open GL is (or has become) on macOS. Which is a shame because you can do really cool stuff with it).

                              CyberGenC 1 Reply Last reply Reply Quote 0
                              • HISEnbergH HISEnberg referenced this topic on
                              • CyberGenC
                                CyberGen @Christoph Hart
                                last edited by

                                @Christoph-Hart @Gabor-K @d-healey I'm having the same problem mentioned above. My instrument features a few simple shaders. Since I upgraded to the latest version of HISE, they have stopped working when I export the project—they just don't show up. They still work fine inside HISE. I have the OpenGL settings checked and the preprocessor flag enabled, but nothing seems to help. I understand that OpenGL appears to be deprecated on Mac, but I don't understand why things that exported and worked fine with an older version of HISE no longer work in the most recent build. As it stands, shaders are a critical part of this instrument's UI, and I really don't want to abandon all that work.

                                Is there anything else I can try to help it work as it did in a previous version of HISE?

                                CyberGenC 1 Reply Last reply Reply Quote 1
                                • CyberGenC
                                  CyberGen @CyberGen
                                  last edited by

                                  @CyberGen update. So, it turns out the expansions weren't coping to the app support folder correctly and that was causing the shaders not to show up. Once I fixed the expansions folder, the shaders started working again. So it seems it had nothing to do with openGL and everything to do me effing up the export. Cheers!

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

                                  13

                                  Online

                                  1.7k

                                  Users

                                  11.8k

                                  Topics

                                  102.6k

                                  Posts