pouët.net

Go to bottom

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).
added on the 2011-12-26 23:16:20 by Tigrou Tigrou
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.
added on the 2011-12-27 00:06:51 by fizzer fizzer
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.
added on the 2011-12-27 01:38:04 by fizzer fizzer
Dark chocolate 3d plasma :)
http://glsl.heroku.com/e#839.0
added on the 2011-12-27 11:26:54 by Optimus Optimus
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..
added on the 2011-12-27 13:16:11 by psonice psonice
...yet it works perfectly on firefox. Strange. And holy fuck is it fast now :D
added on the 2011-12-27 13:36:04 by psonice psonice
Very cool, Optimus :)

BTW i made this

Cubes and Spheres http://glsl.heroku.com/e#865.0
Optimus : This is wicked AND awesome !!
added on the 2011-12-27 17:35:22 by flure flure
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
added on the 2011-12-27 18:28:09 by psonice psonice
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.
added on the 2011-12-27 19:17:45 by Optimus Optimus
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 :)
psonice: is this what you're getting? http://code.google.com/p/chromium/issues/detail?id=108727
added on the 2011-12-28 06:30:09 by mrdoob mrdoob
Yep, that's the exact same thing. Added my voice to the bug report, thanks :)
added on the 2011-12-28 11:41:40 by psonice psonice
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
added on the 2011-12-28 23:01:13 by Optimus Optimus
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! :)
http://glsl.heroku.com/e#909.0
The same tecnique used in @301z manga
Awesome. I like the motion blur too.
added on the 2011-12-29 11:12:03 by Optimus Optimus
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
added on the 2012-01-09 01:13:36 by Optimus Optimus
The only reason I'm here is to encourage Optimus to keep going.
added on the 2012-01-09 01:16:21 by rc55 rc55
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.
added on the 2012-01-10 13:09:48 by ekoli ekoli
Optimus: Made a fork.
added on the 2012-01-10 16:01:18 by raer raer
The "random" number generator is a problem. It not very good...
added on the 2012-01-10 16:02:36 by raer raer
Great one!
I should use another random function, like one a friend gave me for another project.
added on the 2012-01-11 23:20:03 by Optimus Optimus

login

Go to top