Shaders

Always intrigged by shaders and what they can do, I first discover them at work when helping graphists to build effects in Unity 3D. Then I forget about shaders. But…

One day I fall on ShaderToy and was stuck by what they where capable of. So I dive-in following different tutorials TheArtOfCode, TheBookOfShaders.

Start playing with “blobs” (isosurfaces)

First I try to make a kinf of lava lamp, and inspired myself from a pixar article, I hack GLSL shaders using the GlslCanvas and ShaderToy Visual Studio Code extentions.

Bellow the evolution of my tries.

Blob with distance distance Field

Then add more ‘blobs’, layers and use color map to get these:

plasmama_04

plasmama_02

plasmama_05

plasmama_01

Adding perlin noise

For more info on perlin noise, see this video.

plasmama_03

Playing with color and shape merge

distance_field

Playing with fract

Fract allow to keeping only the fractional part of a value, 1.2456 => 0.2456. This allow you to create square spaces to handle local drawings.

fraq_01

fraq_02

Playing with Voronoy

For more info on Voronoy, see this video.

voronoy_01

voronoy_02

Playing with polar coordinates

For more info on polar coordinates, see this video.

Changing from x,y coordinates to angle and length.

polar_coord_01

polar_coord_03

Playing with raymarching

Ray-marching or sphere-tracing is a simplified version of ray-tracing, that allow to build a 3D renderer in a single shader file. For more information see this great video.

raymarch_sphere

procedural_texture

Constant Dupuis Written by:

Franco-Belgium Geek for a bit more of 4 decades and eveloper for bit less than 3 decades.