• Isadora
  • Get it
  • Forum
  • Help
  • ADD-ONS
  • Newsletter
  • Impressum
  • Dsgvo
  • Impressum
Forum

Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags

    GLSL Shader Actor Issue when pasting source code from ShaderToy

    Troubleshooting and Bug Reports
    4
    4
    1464
    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.
    • J
      jxq last edited by

      Hi guys, I am a complete beginner with GLSL coding and followed the ISADORA tutorial on using the GLSL Shader Actor to test shaders from ShaderToy.com. I followed the steps in the tutorial with the nebula - space shader and these errors showed up:

      FRAG ERROR: 0:37: Use of undeclared identifier 'iTime'
      FRAG ERROR: 0:45: Use of undeclared identifier 'iTime'
      FRAG ERROR: 0:45: Use of undeclared identifier 'iTime'
      FRAG ERROR: 0:47: Use of undeclared identifier 'strength'
      FRAG ERROR: 0:64: Use of undeclared identifier 'iTime'
      FRAG ERROR: 0:67: Use of undeclared identifier 'time2'
      FRAG ERROR: 0:74: Use of undeclared identifier 'iTime'
      FRAG ERROR: 0:81: Use of undeclared identifier 'a_xy'
      FRAG ERROR: 0:81: Use of undeclared identifier 'a_xy'
      FRAG ERROR: 0:81: Use of undeclared identifier 'a_xy'
      FRAG ERROR: 0:81: Use of undeclared identifier 'a_xy'
      FRAG ERROR: 0:98: Use of undeclared identifier 'iTime'
      FRAG ERROR: 0:98: Use of undeclared identifier 'iTime'
      FRAG ERROR: 0:99: Use of undeclared identifier 'iTime'
      FRAG ERROR: 0:99: Use of undeclared identifier 'iTime'
      FRAG ERROR: 0:101: Use of undeclared identifier 'iTime'
      FRAG ERROR: 0:104: Use of undeclared identifier 'rot_xy'
      FRAG ERROR: 0:105: Use of undeclared identifier 'rot_xy'
      FRAG ERROR: 0:116: Use of undeclared identifier 'rot_xy'
      FRAG ERROR: 0:122: Use of undeclared identifier 'time2'
      FRAG ERROR: 0:2

      I then proceeded to copy and paste the Shader Inputs on ShaderToy and the following error showed up:

      FRAG ERROR: 0:8: 'iChannel0' : syntax error: syntax error

      I am extremely confused and like I said a complete beginner with GLSL, if anyone has any leads please let me know! Thanks

      mark 1 Reply Last reply Reply Quote 0
      • artoo
        artoo last edited by

        hi,

        i'm not really the guy you need to help you, but i've found some tricks to try code from shadertoy in isadora:

        you have to replace all the "iTime" instance by "iGlobalTime" this should resolve some errors...

        in lots of shader you will also probably need to replace "texture" by "texture2D"

        and if you get a "iframe" error you'll have to create an input by pasting this code : 

        // ISADORA_INT_PARAM(iFrame, ifrm, 0, 2147483647, 0, "The current frame number.")
        uniform int iFrame;

        with this 3 tips you will probably be able to play with many shaders from shadertoy.

        Izzy 2.6.1 | MacPro (2013) 3.7GHz i7 16GB 2xAMD FirePro D500 | OSX 10.13.6
        Izzy 3.2 | MacbookPro M1Max (10/24 core) 32Go ram | OSX 12.2

        1 Reply Last reply Reply Quote 2
        • jhoepffner
          jhoepffner last edited by

          Hello,

          The biggest problems with shader in any software is each different software use different way of input, different version of glsl and there is a lack of good explanation on how to use it…

          I recommand you, first, to read the "Book of Shader", a great introduction to pixel shader and many time easier to adapt in Isadora. Second read with attention the tutorial made by Mark, it explain the basics of pixel shader in Isadora.

          After that you have to find your way between shader tutorials in Processing (well made), Max/Msp (not so bad) TouchDesigner (perhaps the better tutorial). I never use shaderToy for teaching because many shaders are very complicate, not documented, difficult to adapt in other software and very demanding for the GPU. Begin from the very basic, as in Book of Shaders.

          Hope that helps,

          Jacques

          Jacques Hoepffner http://hoepffner.info
          GigaByte 550b / Ryzen 7 3800X / Ram 64 Go / RTX 3090 24 Go / SSD 2 To / raid0 32 To
          MBP 13' i5 2.6 Ghz 16 Go / Intel Iris / macOs 10.11.6 / izzy 2.6.1 + 3.0.3b2
          MBP 15' i7 2.6 Ghz 16 Go / GTX 650M 1Go/ MacOs10.13.3 / Izzy 2.6.1
          MSI GS65 i7 3.6 Ghz 32 Go / GTX 1070 8 Go / Windows 10 / Izzy 3.0.3b2

          1 Reply Last reply Reply Quote 2
          • mark
            mark @jxq last edited by mark

            @jxq said:

            I followed the steps in the tutorial with the nebula - space shader and these errors showed up:

             Since the release of Isadora v2.5.2, ShaderToy changed several of their variable names. That causes the errors you're seeing above... and unfortunately we can't do much about that except to release updates when they make changes like that.

            Isadora v2.6, which will absolutely positively be out by Dec 31st, 2017 will address these issues.

            That said, please post the link to the shader you had trouble with so I can test it with the v2.6 beta. I'll make sure it's working before we release.

            Best,
            Mark

            Media Artist & Creator of Isadora
            Macintosh SE-30, 32 Mb RAM, MacOS 7.6, Dual Floppy Drives

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