0.00 00.0 fps
Comments
Sign in to post a comment.
Shader Inputs
uniform vec3      iResolution;           // viewport resolution (in pixels)
uniform float iGlobalTime; // shader playback time (in seconds)
uniform float iChannelTime[4]; // channel playback time (in seconds)
uniform vec3 iChannelResolution[4]; // channel resolution (in pixels)
uniform vec4 iMouse; // mouse pixel coords. xy: current (if MLB down), zw: click
uniform samplerXX iChannel0..3; // input channel. XX = 2D/Cube
uniform vec4 iDate; // (year, month, day, time in seconds)
uniform float iSampleRate; // sound sample rate (i.e., 44100)
0 chars
Select Input
Misc
Standard Keyboard

Textures
Resolution: 512 x 512
Format: rgb

Source: unkown
Resolution: 1024 x 1024
Format: rgb

Source: unkown
Resolution: 512 x 512
Format: rgb

Source: unkown
Resolution: 512 x 512
Format: rgb

Source: unkown
Resolution: 512 x 512
Format: rgb

Source: unkown
Resolution: 1024 x 1024
Format: rgb

Source: unkown
Resolution: 1024 x 1024
Format: rgb

Source: unkown
Resolution: 1024 x 1024
Format: rgb

Source: www.shadertoy.com
Resolution: 512 x 512
Format: rgb

Source: www.shadertoy.com
Resolution: 1024 x 1024
Format: rgb

Source: www.shadertoy.com
Resolution: 64 x 64
Format: r

Source: www.shadertoy.com
Resolution: 64 x 64
Format: rgba

Source: www.shadertoy.com
Resolution: 256 x 256
Format: r

Source: www.shadertoy.com
Resolution: 8 x 8
Format: r

Source: www.shadertoy.com
Resolution: 256 x 256
Format: rgba

Source: www.shadertoy.com
Resolution: 256 x 32
Format: rgb

Source: www.shadertoy.com

Videos / Webcam
Duration: 34s

Source: www.google.com
Duration: 3m 40s

Source: http://www.youtube.com/watch?v=I02Ss2VUM3U
Duration: 29s

Source: https://archive.org/details/movies
Duration: 2m 19s

Source: https://www.youtube.com/watch?v=T2k0PZCPQMk
Webcam

Cubemaps
Resolution: 512x512

Source: http://www.pauldebevec.com/Probes
Resolution: 64x64

Source: http://www.pauldebevec.com/Probes
Resolution: 256x256

Source: http://www.pauldebevec.com/Probes
Resolution: 64x64

Source: http://www.pauldebevec.com/Probes
Resolution: 128x128

Source: http://www.pauldebevec.com/Probes
Resolution: 64x64

Source: http://www.pauldebevec.com/Probes

Music

ElectronebulaeTitle: Electronebulae
Duration: 4m 18s
Author: stage7

ExperimentTitle: Experiment
Duration: 3m 48s
Author: iq

8 bit mentalityTitle: 8 bit mentalit
Duration: 3m 25s
Author: stage7

X'TrackTureTitle: X'TrackTure
Duration: 3m 50s
Author: josSs

ourpithyatorTitle: ourpithyator
Duration: 7m 32s
Author: AudeoFlow & Gizma

Tropical BeeperTitle: Tropical Beepe
Duration: 2m 42s
Author: Dave Hoskins

Most Geometric PersonTitle: Most Geometric Person
Duration: 1m 15s
Author: Noby
Select Input
GLSL Help
This help only covers the parts of GLSL ES that are relevant for Shadertoy. For the complete specification please have a look at GLSL ES specification

Language:


  • Preprocessor: # #define #undef #if #ifdef #ifndef #else #elif #endif #error #pragma #extension #version #line
  • Operators: () + - ! * / % << >> < > <= >= == != && ||
  • Comments: // /* */
  • Types: void bool int float vec2 vec3 vec4 bvec2 bvec3 bvec4 ivec2 ivec3 ivec4 mat2 mat3 mat4 sampler2D
  • Function Parameter Qualifiers: [none], in, out, inout
  • Global Variable Qualifiers: const
  • Vector Components: .xyzw .rgba .stpq
  • Flow Control: if else for return break continue
  • Output: vec4 gl_FragColor
  • Input: vec4 gl_FragCoord

Built-in Functions:


  • type radians (type degrees)
  • type degrees (type radians)
  • type sin (type angle)
  • type cos (type angle)
  • type tan (type angle)
  • type asin (type x)
  • type acos (type x)
  • type atan (type y, type x)
  • type atan (type y_over_x)
  • type pow (type x, type y)
  • type exp (type x)
  • type log (type x)
  • type exp2 (type x)
  • type log2 (type x)
  • type sqrt (type x)
  • type inversesqrt (type x)
  • type abs (type x)
  • type sign (type x)
  • type floor (type x)
  • type ceil (type x)
  • type fract (type x)
  • type mod (type x, float y)
  • type mod (type x, type y)
  • type min (type x, type y)
  • type min (type x, float y)
  • type max (type x, type y)
  • type max (type x, float y)
  • type clamp (type x, type minV, type maxV)
  • type clamp (type x, float minV, float maxV)
  • type mix (type x, type y, type a)
  • type mix (type x, type y, float a)
  • type step (type edge, type x)
  • type step (float edge, type x)
  • type smoothstep (type a, type b, type x)
  • type smoothstep (float a, float b, type x)
  • mat matrixCompMult (mat x, mat y)
  • float length (type x)
  • float distance (type p0, type p1)
  • float dot (type x, type y)
  • vec3 cross (vec3 x, vec3 y)
  • type normalize (type x)
  • type faceforward (type N, type I, type Nref)
  • type reflect (type I, type N)
  • type refract (type I, type N,float eta)
  • bvec lessThan(vec x, vec y)
  • bvec lessThan(ivec x, ivec y)
  • bvec lessThanEqual(vec x, vec y)
  • bvec lessThanEqual(ivec x, ivec y)
  • bvec greaterThan(vec x, vec y)
  • bvec greaterThan(ivec x, ivec y)
  • bvec greaterThanEqual(vec x, vec y)
  • bvec greaterThanEqual(ivec x, ivec y)
  • bvec equal(vec x, vec y)
  • bvec equal(ivec x, ivec y)
  • bvec equal(bvec x, bvec y)
  • bvec notEqual(vec x, vec y)
  • bvec notEqual(ivec x, ivec y)
  • bvec notEqual(bvec x, bvec y)
  • bool any(bvec x)
  • bool all(bvec x)
  • bvec not(bvec x)
  • vec4 texture2D(sampler2D sampler, vec2 coord )
  • vec4 texture2D(sampler2D sampler, vec2 coord, float bias)
  • vec4 textureCube(samplerCube sampler, vec3 coord)
  • vec4 texture2DProj(sampler2D sampler, vec3 coord )
  • vec4 texture2DProj(sampler2D sampler, vec3 coord, float bias)
  • vec4 texture2DProj(sampler2D sampler, vec4 coord)
  • vec4 texture2DProj(sampler2D sampler, vec4 coord, float bias)
  • type dFdx( type x ), dFdy( type x )
  • type fwidth( type p )

How-to


  • Use structs: struct myDataType { float occlusion; vec3 color; }; myDataType myData = myDataType(0.7, vec3(1.0, 2.0, 3.0));
  • Initialize arrays: arrays cannot be initialized in WebGL.
  • Do conversions: int a = 3; float b = float(a);
  • Do component swizzling: vec4 a = vec4(1.0,2.0,3.0,4.0); vec4 b = a.zyyw;
  • Access matrix components: mat4 m; m[1] = vec4(2.0); m[0][0] = 1.0; m[2][3] = 2.0;

Be careful!


  • the f suffix for floating pont numbers: 1.0f is illegal in GLSL. You must use 1.0
  • saturate(): saturate(x) doesn't exist in GLSL. Use clamp(x,0.0,1.0) instead
  • pow/sqrt: please don't feed sqrt() and pow() with negative numbers. Add an abs() or max(0.0,) to the argument
  • variables: initialize your variables! Don't assume they'll be set to zero by default
  • functions: don't call your functions the same as some of your variables

Shadertoy specific inputs


vec3iResolutionimageThe viewport resolution (z is pixel aspect ratio, usually 1.0)
floatiGlobalTimeimage/soundCurrent time in seconds
floatiChannelTime[4]imageTime for channel (if video or sound), in seconds
vec3iChannelResolution0..3image/soundInput texture resolution for each channel
vec4iMouseimagexy = current pixel coords (if LMB is down). zw = click pixel
sampler2DiChannel{i}image/soundSampler for input textures i
vec4iDateimage/soundYear, month, day, time in seconds in .xyzw
floatiSampleRateimage/soundThe sound sample rate (typically 44100)

Shadertoy outputs


For image shaders, the regular gl_FragColor is used as output channel. It is not for now mandatory but recommended to leave the alpha channel to 1.0;

For sound shaders, the mainSound() function is supposed to return a vec2 to as an output containing the lsft and right (stereo) sound channel wave data.


BBCode Help

Codes:


You can format your comments by using standard BBCode. The following tags are implemented in Shadertoy:

Bold[b]this text goes in bold[/b]
Italic[i]this text goes in italic[/i]
Images[img]url_to_image[/img]
Url[url]http://www.shadertoy.com[/url]
Url[url=http://www.shadertoy.com]Shadertoy[/url]
Code[code]fixed-width text[/code]
Video[video]http://www.youtube.com/watch?v=32yZm2TLHgY[/video]

Emoticons:


:)
:(
:D
:love:
:octopus:
:octopusballoon:

Symbols:


:alpha:α
:beta:β
:delta:Δ
:epsilon:ε
:nabla:
:square:²
:cube:³
:limit:

Share your shader
Direct link:

Just copy and paste this URL below:

Embed:

Share your shader
Yes
No