Skip to content

Instantly share code, notes, and snippets.

@el-gringo
Last active May 19, 2020 11:59
Show Gist options
  • Save el-gringo/7bae0582791b20c2522061f1c7a098e9 to your computer and use it in GitHub Desktop.
Save el-gringo/7bae0582791b20c2522061f1c7a098e9 to your computer and use it in GitHub Desktop.
Shadertoy compatibility for GLSLSandox
#ifdef GL_ES
precision mediump float;
#endif
// glslsandbox uniforms
uniform float time;
uniform vec2 resolution;
uniform vec2 mouse;
// shadertoy globals
#define iTime time
#define iResolution vec3(resolution, 0.0)
#define iMouse vec4(mouse, 0.0, 0.0)
void mainImage (out vec4 fragColor, in vec2 fragCoord);
void main(void) {
mainImage(gl_FragColor, gl_FragCoord.xy);
}
/*
* Original shader from: https://www.shadertoy.com/view/XlcfzS
*/
@el-gringo
Copy link
Author

Just copy paste this code in glslsanbox.com then copy paste the Shadertoy code after.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment