URL: http://glslsandbox.com/e#24965.0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
// GPU Particle // By: Brandon Fogerty // bfogerty at gmail dot com // xdpixel.com #ifdef GL_ES precision mediump float; #endif uniform float time; uniform vec2 resolution; #define ParticleScale 7.0 void main( void ) { vec2 uv = ( gl_FragCoord.xy / resolution.xy ) * 2.0 - 1.0; uv.x *= resolution.x / resolution.y; vec3 finalColor = vec3( 2.0, 1.4, 1.0 ); finalColor *= abs( 1.0 / ( sin( length(uv) ) * ParticleScale ) ); gl_FragColor = vec4( finalColor, 1.0 ); } |