qvolray
annotate sdr/demo.p.glsl @ 18:3d05c261a2f4
demo metaballs crash & burn
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Wed, 11 Apr 2012 06:08:59 +0300 |
parents | |
children | 784d3d321caa |
rev | line source |
---|---|
nuclear@18 | 1 void main() |
nuclear@18 | 2 { |
nuclear@18 | 3 float val = 0.0; |
nuclear@18 | 4 float len = length(gl_FragCoord.xyz); |
nuclear@18 | 5 if(len < 0.5) { |
nuclear@18 | 6 val = 1.0; |
nuclear@18 | 7 } |
nuclear@18 | 8 |
nuclear@18 | 9 gl_FragColor = vec4(gl_FragCoord.xyz / len, val); |
nuclear@18 | 10 } |