qvolray
diff 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 |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/sdr/demo.p.glsl Wed Apr 11 06:08:59 2012 +0300 1.3 @@ -0,0 +1,10 @@ 1.4 +void main() 1.5 +{ 1.6 + float val = 0.0; 1.7 + float len = length(gl_FragCoord.xyz); 1.8 + if(len < 0.5) { 1.9 + val = 1.0; 1.10 + } 1.11 + 1.12 + gl_FragColor = vec4(gl_FragCoord.xyz / len, val); 1.13 +}