GLSL Sandbox
category: code [glöplog]
For the ones who want to start glsl / raymarching stuff and dont know how to start, you can try Polydraw. It provides a great interactive environment to try things or test prototypes rapidly (win32 only). please check /tigrou folder, it contains some examples of stuff i tried several months ago (both opengl and raymaching stuff).
I agree, Polydraw is great for quickly trying things out. It certainly makes me feel better about the fact that evaldraw doesn't seem to work very well under Windows 7.
http://glsl.heroku.com/e#874.1 - Oops, I got the gradient extraction wrong. Now it is fixed, and the strokes will align properly with the underlying image.
Dark chocolate 3d plasma :)
http://glsl.heroku.com/e#839.0
http://glsl.heroku.com/e#839.0
Hmm.. slight downer here! Just bought a nice shiny new laptop with a decent GPU (the current macbook pro). In the latest chrome I'm getting a compile error on everything, always line 5, always "webgl_emu_precision". Any ideas? I'm on osx, everything is updated..
...yet it works perfectly on firefox. Strange. And holy fuck is it fast now :D
Optimus : This is wicked AND awesome !!
Yep, that's seriously cool optimus :) In the past that would have been a full demo for you, now it's a single screen. Umm.. progress? :D
Thanks! In fact a friend suggested that I should release it as a 4k or something but now it's out already :)
Now I'd love to try some 3d. I am curious how the sphere morphs into the cube with distance functions method in paulo's entry.
Now I'd love to try some 3d. I am curious how the sphere morphs into the cube with distance functions method in paulo's entry.
Hi Optimus, morph is easy stuff in raymarching :)
c1 is distance to cube (iq formula, from http://www.iquilezles.org/www/articles/distfunctions/distfunctions.htm)
float c1=length(max(abs(p)-vec3(0.6,0.6,0.6),0.0))-0.35;
c2 is distance to sphere
float c2=length(p)-1.0;
linear interpolate, in this case using mix function, between the two distances, with a sin(time) :)
float cf=sin(time)*0.5+0.5;
return vec2(mix(c1,c2,cf),1.0)
that's it :)
c1 is distance to cube (iq formula, from http://www.iquilezles.org/www/articles/distfunctions/distfunctions.htm)
float c1=length(max(abs(p)-vec3(0.6,0.6,0.6),0.0))-0.35;
c2 is distance to sphere
float c2=length(p)-1.0;
linear interpolate, in this case using mix function, between the two distances, with a sin(time) :)
float cf=sin(time)*0.5+0.5;
return vec2(mix(c1,c2,cf),1.0)
that's it :)
psonice: is this what you're getting? http://code.google.com/p/chromium/issues/detail?id=108727
Yep, that's the exact same thing. Added my voice to the bug report, thanks :)
Something that I abandoned the very last time because no recursion was allowed or memory was little but now found another time to do it.
2x2 with recursion:
http://glsl.heroku.com/e#907.0
The 4x4 effects with recursion:
http://glsl.heroku.com/e#905.1
2x2 with recursion:
http://glsl.heroku.com/e#907.0
The 4x4 effects with recursion:
http://glsl.heroku.com/e#905.1
http://glsl.heroku.com/e#908.0
A variation of Cubes and Spheres (black and white version)
With stochastic sampling anti-aliasing
Using the backbuffer for acumulation
Best viewed in 1
I love Monte Carlo rendering tecniques! :)
A variation of Cubes and Spheres (black and white version)
With stochastic sampling anti-aliasing
Using the backbuffer for acumulation
Best viewed in 1
I love Monte Carlo rendering tecniques! :)
http://glsl.heroku.com/e#909.0
The same tecnique used in @301z manga
The same tecnique used in @301z manga
Awesome. I like the motion blur too.
Started as an experiment to make random walker with use of backbuffer, ended in great looking diffusion effect :)
Let it run for a while.
http://glsl.heroku.com/e#1043.1
Let it run for a while.
http://glsl.heroku.com/e#1043.1
The only reason I'm here is to encourage Optimus to keep going.
A lot of these glsl.heroku.com shaders worked quite well in latest Aurora ( Firefox nightly ) on the Galaxy Nexus. It's obvious that the GPU on that thing isn't the fastest one around, but it worked better then I expected.
Optimus: Made a fork.
The "random" number generator is a problem. It not very good...
Great one!
I should use another random function, like one a friend gave me for another project.
I should use another random function, like one a friend gave me for another project.
Anybody into mazes?
http://glsl.heroku.com/e#1131.1
http://glsl.heroku.com/e#1131.1