Created
June 16, 2015 00:05
-
-
Save spite/a5d4388c01ba59cc879a to your computer and use it in GitHub Desktop.
ShaderToy wrapper
This file contains hidden or 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
// VERTEX SHADER | |
attribute vec2 pos; | |
void main() { | |
gl_Position = vec4(pos.xy,0.0,1.0); | |
} | |
// FRAGMENT SHADER | |
#ifdef GL_ES | |
precision highp float; | |
#endif | |
#extension GL_OES_standard_derivatives : enable | |
uniform vec3 iResolution; | |
uniform float iGlobalTime; | |
uniform float iChannelTime[4]; | |
uniform vec4 iMouse; | |
uniform vec4 iDate; | |
uniform float iSampleRate; | |
uniform vec3 iChannelResolution[4]; | |
uniform sampler2D iChannel0; | |
uniform sampler2D iChannel1; | |
uniform sampler2D iChannel2; | |
uniform sampler2D iChannel3; | |
// Shader Code | |
void main( void ){ | |
vec4 color = vec4(0.0,0.0,0.0,1.0); | |
mainImage( color, gl_FragCoord.xy ); | |
color.w = 1.0; | |
gl_FragColor = color; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment