Comment by tomjakubowski

9 years ago

Sweeeeeeeeeeeeeet!

I noticed this doesn't run on my iPhone (SE), because XOR is unsupported in GLES 2.0, so I hacked the shader up a bit to be compatible. (and because I'd never had the opportunity to implement XOR using integer arithmetic)

For whatever reason, I could not get my hacked ShaderToy version to work on my phone (possibly a Shadertoy uniform bug?), even though it compiled in the iPhone's browser without issue, and even though it works just fine on my laptop. A slightly modified version of my hacked shader works as expected on my phone in the Book of Shaders editor. I had to "guess" at a reasonable iFrame value by dividing u_time by 60.0, and since the BoS editor doesn't support "resetting time" without reloading, I made it "loop" with a hardcoded loop time of 9 seconds.

shadertoy: https://www.shadertoy.com/view/Mlscz2

book of shaders (code): http://thebookofshaders.com/edit.php?log=170917091706

book of shaders (player): http://player.thebookofshaders.com/?log=170917091706

For some reason it gives me Unknown Error: ERROR: 0:? : '' : syntax error

  • I had a bizarre issue like this in the BoS editor, where it seemed to convert my backslash character inputs (used to spread the definition of that xor_step macro across many lines) to something non-ASCII, which caused a shader compiler error. This error was printed only in the browser's developer tool console.