Last active
May 19, 2020 11:59
-
-
Save el-gringo/7bae0582791b20c2522061f1c7a098e9 to your computer and use it in GitHub Desktop.
Shadertoy compatibility for GLSLSandox
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just copy paste this code in glslsanbox.com then copy paste the Shadertoy code after.