This javascript webapp converts GLSL code from shadertoy.com to Gamemaker GLSL ES as well as output other necessary code to run.
- Adds
varying vec2 fragCoord;
- Replaces
void MainImage()
withvoid main(void)
. - Replaces
fragColor
withgl_FragColor
. - Replaces all instances of
texture
totexture2D
. - Replaces all instances of
iChannel0
togm_BaseTexture
. - Replaces all instances of
iTime
toiGlobalTime
. - Adds
uniform vec3 iResolution;
ifiResolution.xy
is found, else... - ...Adds
uniform float iResolution;
ifiResolution
is found - Adds
uniform float iGlobalTime;
. - Edits the pow(x, y) function to pow(abs(x), y)
- Outputs vertex, fragment, create event, and draw event.
- Warns of incompatible commands.
This works for simple shaders. More complex shaders require more manual work on your part.
Shader Inputs | Supported |
---|---|
iResolution | ✔ |
iTime | ✔ |
iTimeDelta | ❌ |
iFrame | ❌ |
iChannelTime | ❌ |
iChannelResolution | ❌ |
iMouse | ❌ |
iChannel0 | ✔ |
iDate | ❌ |
iSampleRate | ❌ |
✔️JavaScript text processing.
Any feedback is welcome! :)