HISE Logo Forum
    • Categories
    • Register
    • Login

    OK, who did this?

    Scheduled Pinned Locked Moved General Questions
    16 Posts 7 Posters 1.1k 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.
    • Dan KorneffD
      Dan Korneff @Christoph Hart
      last edited by

      @Christoph-Hart Nice one!

      Dan Korneff - Producer / Mixer / Audio Nerd

      1 Reply Last reply Reply Quote 0
      • NatanN
        Natan
        last edited by

        @Christoph-Hart Why this means?

        Interface:! WARNING: 0:86: Unary operation folding into constant is supported in newer GLSL versions{GLSL::Interface::bunny.glsl}
        Interface:! ERROR: 0:94: '' : illegal character (`) (0x60){GLSL::Interface::bunny.glsl}
        Interface:! ERROR: 0:94: '' : illegal character (`) (0x60){GLSL::Interface::bunny.glsl}
        
        Christoph HartC 1 Reply Last reply Reply Quote 0
        • Christoph HartC
          Christoph Hart @Natan
          last edited by

          @Natan Ah, it was just an error in how I pasted the code, try again now (or remove the backticks on the last line yourself).

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

            @Christoph-Hart :exploding_head:

            Thank you so much.

            This opens up so many possibilities.

            It flys way above my coding skills. What parts of the script should I focus on In order to customize it?

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

              @RastaChess just start by changing random numbers in the GLSL script and recompile. If you want to dive into that subject, you might want to read up on the entire distance function theory here:

              Link Preview Image
              Inigo Quilez

              Tutorials and articles of Inigo Quilez on computer graphics, fractals, demoscene, shaders and more.

              favicon

              (iquilezles.org)

              That's maybe the most valuable resource when it comes to Shader development.

              CyberGenC ustkU 2 Replies Last reply Reply Quote 4
              • CyberGenC
                CyberGen @Christoph Hart
                last edited by

                @Christoph-Hart Thank You

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

                  @Christoph-Hart I have not been able to compile my shaders for ages until I got to the point where decided not to use them anymore...

                  ...until I read that warning in the doc today:

                  // Enable Shader Line Numbers
                  Old graphic cards (eg. the integrated Intel HD ones) do not support this, so if you get a weird GLSL compile error, untick this line.
                  

                  :zany_face: :zany_face: :zany_face: :zany_face:

                  Complicated things are sometimes so simple...

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

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

                    @ustk yes the entire GLSL thing is a bit finicky (Also for production code you might want to add a minimal GLSL version requirement).

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

                      @ustk I was able to run @Christoph-Hart's exercise. But I have to say it's hard to wrap my head around how it works. It's appears so complicated. I tried with other shapes and things just disappear from the UI.

                      Can someone share a simple of example of how to have a primitive shape like a sphere show up on the UI?

                      thanks.

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

                        @Christoph-Hart Trying to test the GLSL version to decide to use it or not in production,
                        but the openGLStats isn't populated before trying to apply the shader at least once:

                        void paint(Graphics& g) override
                        {
                            //...
                            
                            if (obj->dirty)
                            {
                                auto r = obj->shader->checkCompilation(g.getInternalContext());
                                obj->setCompileResult(r);
                                obj->makeStatistics(); // So it's not called before the first painting attempt
                                obj->dirty = false;
                            }
                        

                        Unless this is not a problem in a scenario where the version isn't compatible, and I can just hide the panel,
                        not worrying if the paint routine has been called but didn't succeeded...

                        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

                          It's appears so complicated. I tried with other shapes and things just disappear from the UI.

                          Can someone share a simple of example of how to have a primitive shape like a sphere show up on the UI?

                          So if you really want to learn this, you need to learn shader programming. There's plenty of resources online for that, just remember that in HISE you only work with FRAGMENT SHADERS, so whenever they start talking about vertex shaders or textures, you need to skip these parts.

                          The most complicated thing to wrap your head around at the beginning is that you need to forget how usual 2D graphics programming work. Stuff like drawCircle() or fillRect() will not be available, because the GPU is highly parallelized and needs to be able to calculate every single pixel independently. So in order to draw a circle, you need to check whether the given coordinate (that pixel you're about to render) has a smaller distance to the circle center than the radius, and in that case, you can assume it's inside the circle and draw it with the circle colour.

                          I suggest you head over to shadertoy.com, search for simple examples and start modifying the code to get a feeling for how it works.

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

                          51

                          Online

                          1.7k

                          Users

                          11.7k

                          Topics

                          101.8k

                          Posts