HISE Logo Forum
    • Categories
    • Register
    • Login

    Shader definition issue or me not understanding ?

    Scheduled Pinned Locked Moved Bug Reports
    3 Posts 2 Posters 235 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.
    • ustkU
      ustk
      last edited by ustk

      It seems increment returns back to 0.0 at each iteration, hence not incrementing...

      Is this a normal behaviour? (entire code executed in loop or only main())
      Is there a way to watch a variable in a shader?

      float increment = 0.0;
      
      void main()
      {
          increment += 0.1; // Does not seem to increment (at least more than once)
      }
      
      

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

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

        I have just tested online and effectively it does not increment...
        The thing is that I want to increment a variable but not rely on iTime for other reasons.

        EDIT: well I think I will just use a uniform in the end and increment from Hise script...

        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

          @ustk the main function of a fragment shader is stateless because it will be executed simultaneously for every pixel on the GPU which is an absurd fact to wrap your head around at the beginning.

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

          41

          Online

          1.7k

          Users

          11.7k

          Topics

          101.9k

          Posts