assurance-tunnel
assurance-tunnel
assurance-tunnel
assurance-tunnel

GLSL Shader Actor Issue when pasting source code from ShaderToy



  • 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



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

  • Beta Gold

    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



  • @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


Log in to reply
 

Looks like your connection to TroikaTronix Community Forum was lost, please wait while we try to reconnect.