HISE Logo Forum
    • Categories
    • Register
    • Login

    I'll just leave this here...

    Scheduled Pinned Locked Moved General Questions
    106 Posts 16 Posters 9.7k 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 A Former User

      @Christoph-Hart How is iTime related to timer objects in HISE?

      I have a synth timer running in my instrument and the shader panel just runs along with it although I don't pass it anything...

      Also when I drag a knob the shader starts moving along. Without me setting up a callback that passes a uniform variable into it...
      Got me thinking that maybe a knob also runs on an internal timer-like object... 🤯

      EDIT: It seems like iTime is always running... also while editing the shader keeps changing in the background and visually only shows updates when hovering over UI elements and interacting with them. When I hit compile it catches up with iTime and all is in sync again...

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

        Maybe I should hit the screensaver business after all... 😂

        Hoping to pass the obligatory psychedelically-influenced first phase of shader coding soon to produce more meaningful and interesting stuff...

        HISE_openGL.gif

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

          Yeah, I've been there too. The moment where you stare at a real screensaver and think "Wow that's really beautiful, I wonder how they programmed that" is the moment you need to reevaluate some life choices :)

          But have you started playing around with 3D ray marching? That's where the real fun begins :)

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

            @Christoph-Hart I wanted to dive in shaper code, but I find the code style just :face_vomiting:
            So I postpone this moment the more I can and push even more the panel's paintRoutine in the waiting 🤣

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

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

              @ustk said in I'll just leave this here...:

              code style just

              What do you dislike there? I quickly got used to it (GLSL is C-like so at least there's no Lua madness involved and once you've wrapped your head around how it works (it's really different from the 2D canvas approach), you'll start enjoying it.

              ustkU ? 2 Replies Last reply Reply Quote 0
              • ustkU
                ustk @Christoph Hart
                last edited by

                @Christoph-Hart Yeah I imagine I have to get used to it :)
                I don't like the fact there're no ready methods for drawing basic stuff, even for a circle you have to make your own method. But it makes it powerfull :)

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

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

                  @ustk said in I'll just leave this here...:

                  code style just

                  What do you dislike there? I quickly got used to it (GLSL is C-like so at least there's no Lua madness involved and once you've wrapped your head around how it works (it's really different from the 2D canvas approach), you'll start enjoying it.

                  That it deviates from the 2D Canvas is what mainly gets my brain twisted!! It’s exactly that. I was so lost at first. Now that the panic attacks and the eye bleedings are residing, I am getting more and more into it. Following Martijn’s tutorials over and over again, making notes, messing with some numbers in the code and finally doing it yourself from scratch will get you there eventually. Funny that Martijn learned it from studying Shadertoy examples himself… Raymarching is on the list, yes… Deeply fascinated by what a bunch of numbers and words can generate!

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

                    @ustk said in I'll just leave this here...:

                    ready methods for drawing basic stuff

                    This website is by far the best resource for code examples for GLSL primitives:

                    301 Moved Permanently

                    favicon

                    (www.iquilezles.org)

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

                      @Christoph-Hart Yeah I've just seen that finally, one can find many ready-made methods :)
                      Once the principle is understood it becomes easy to adapt/modify

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

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

                        And there is this thing here:

                        favicon

                        (www.shadertoy.com)

                        It's basically a 2D Graphics API for GLSL. I played around with it and it might ease the transition coming from the Panel Graphics API.

                        1 Reply Last reply Reply Quote 0
                        • A
                          aaronventure
                          last edited by

                          I think you could introduce a question for those signing up. You already have to manually approve them, but something like what VI-C has could reduce the number of these spammers. "What do you call an audio file played back by a virtual instrument?"

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

                            I don't think that will show them...

                            bde096d8-09b3-4c9b-845a-93bb3437abad-image.png

                            By now I'm used to deleting these manually, it's kind of gotten a relaxing hobby at this point...

                            1 Reply Last reply Reply Quote 5
                            • F
                              fellowfinch
                              last edited by

                              Question regarding exporting a standalone application with inserted shaders. I'm not a wiz in scripting, although learning. I did manage to get shaders working in interface designer, but whenever I export it to standalone the shaders are not visible.

                              I assume it's something obvious I might have forgotten to include, but couldn't find what might be wrong.

                              A 1 Reply Last reply Reply Quote 0
                              • A
                                aaronventure @fellowfinch
                                last edited by

                                @fellowfinch Use OpenGL is disabled by default in a plugin that runs.

                                You need to compile HISE with the use_opengl flag enabled (it's somewhere in the projucer). You can see that in the General Settings file in the AppData folder of your plugin.

                                Also if you want to make sure that it gets set to 1, you can just tweak or create that file with the correct flag on install.

                                F 1 Reply Last reply Reply Quote 0
                                • F
                                  fellowfinch @aaronventure
                                  last edited by

                                  @aaronventure
                                  thank you for your reply, however I still can't get HISE to export it with shaders.

                                  I did the following;

                                  • opened projucer and opened the HISE standalone file
                                  • in hi_core module I chose "enabled" on USE_OPENGL and in juce_opengl I flagged use global path
                                  • compiled it in xCode as a standalsone and opened the file in my Build folder
                                  • in my project I went to "Settings" - Development and flagged "Use Open GL"
                                  • exported as a standalone, and once the build was finished, opened it up but its lacking the shaders in the GUI

                                  @aaronventure said in I'll just leave this here...:

                                  You can see that in the General Settings file in the AppData folder of your plugin.

                                  Can't seem to find this particular folder, also probably should mention I'm using a Mac.

                                  @aaronventure said in I'll just leave this here...:

                                  Also if you want to make sure that it gets set to 1, you can just tweak or create that file with the correct flag on install.

                                  Still learning... how exactly do I do this? I tried searching for the files via search and opening up in Sublime to see if there is any file I can change that "open GL" is set to 1. I'm aware this strategy might not be viable...

                                  I can provide any screenshots that might help to pinpoint the problem :)

                                  A 1 Reply Last reply Reply Quote 0
                                  • A
                                    aaronventure @fellowfinch
                                    last edited by

                                    @fellowfinch /Users/YOURNAME/Library/Application Support/Company Name/Project Name/`

                                    F 1 Reply Last reply Reply Quote 0
                                    • F
                                      fellowfinch @aaronventure
                                      last edited by

                                      @aaronventure

                                      aha, I though you were referring to the folder where my project is stored.

                                      I went into the path
                                      /Users/YOURNAME/Library/Application Support/HISE/`

                                      to the HISE General Settings and changed the "0" to 1, like so;

                                      <?xml version="1.0" encoding="UTF-8"?>
                                      
                                      <GLOBAL_SETTINGS DISK_MODE="0" SCALE_FACTOR="1.0" VOICE_AMOUNT_MULTIPLIER="2"
                                                       GLOBAL_BPM="-1.0" MIDI_CHANNELS="1" OPEN_GL="1"/>
                                      

                                      Sadly, when I tried exporting to standalone the shader files did not appear. Even though I can see that there is an include_juce_opengl file in the arm64 folder of the build.
                                      I tried recompiling the HISE standalone app again, making double sure that the openGL was enabled and tried again, yet no shaders are present.

                                      Just to make sure, shaders should appear by exporting the hise project and then finding it in the Binary folder as an exec file?

                                      A 1 Reply Last reply Reply Quote 0
                                      • A
                                        aaronventure @fellowfinch
                                        last edited by

                                        @fellowfinch if it's standalone, yes, it's .exe.

                                        can you also try calling Settings.setEnableOpenGL(true) in your on init script?

                                        F 1 Reply Last reply Reply Quote 0
                                        • F
                                          fellowfinch @aaronventure
                                          last edited by

                                          @aaronventure said in I'll just leave this here...:

                                          Settings.setEnableOpenGL(true)

                                          Content.makeFrontInterface(850, 420);
                                          
                                          Settings.setEnableOpenGL(true);
                                          
                                          //our sampler
                                          const var Sampler1 = Synth.getChildSynth("Sampler1");
                                          
                                          //sample maps array
                                          const var SampleMaps = Sampler.getSampleMapList();
                                          const var ComboBox1 = Content.getComponent("ComboBox1");
                                          
                                          //combo box
                                          ComboBox1.set("items", SampleMaps.join("\n"));
                                          
                                          
                                          inline function onComboBox1Control(component, value)
                                          {
                                          	Sampler1.asSampler().loadSampleMap(SampleMaps[value-1]);
                                          };
                                          
                                          Content.getComponent("ComboBox1").setControlCallback(onComboBox1Control);
                                          
                                          //image input
                                          
                                          const var pnlBCK = Content.getComponent("pnlBCK");
                                          
                                          pnlBCK.loadImage("{PROJECT_FOLDER}test.png", "bck");
                                          
                                          pnlBCK.setPaintRoutine(function(g)
                                          {
                                          	var a = this.getLocalBounds(0);
                                          	
                                          	g.drawImage("bck", a, 0, 0);
                                          
                                          	
                                          });
                                          
                                          
                                          //shaders
                                          //static shader
                                          const var Panel1 = Content.getComponent("Panel1");
                                          const var shader = Content.createShader("shader");
                                          
                                          Panel1.setPaintRoutine(function(g)
                                          {
                                          	g.applyShader(shader, [0, 0, this.getWidth(), this.getHeight()]);
                                          });
                                          //earth shader
                                          const var Panel2 = Content.getComponent("Panel2");
                                          const var shader2 = Content.createShader("shader2");
                                          
                                          Panel2.setPaintRoutine(function(g)
                                          {
                                          	g.applyShader(shader2, [0, 0, this.getWidth(), this.getHeight()]);
                                          });
                                          
                                          
                                          

                                          ran this and compiled ok, the generalSettings file also has a "1", alas shader is not seen in the exported file. I can interact and manipulate it normally inside of HISE though...

                                          A LindonL 2 Replies Last reply Reply Quote 0
                                          • A
                                            aaronventure @fellowfinch
                                            last edited by

                                            @fellowfinch alright, this is the last one I have, then I'm all out of ideas.

                                            There's a FloatingTile component with ContentType = CustomSettings, and one of them is a switch for enabling open GL. can you add that to your plugin, compile it, see if that works.

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

                                            50

                                            Online

                                            1.7k

                                            Users

                                            11.7k

                                            Topics

                                            102.1k

                                            Posts