I look forward to analysing your glsl chocolate delights
Absolutely no mystery there. The
entire FBSL code is just an OpenGL canvas that only renders the final quad whose pixels are colorized by the fragment shader. It also supplies the shader with just two uniforms -- a vec2 with current horz and vert sizes of the canvas, and a float time in seconds (accurate to three decimal places) since the app started.
On default, the GLSL engine applies the entire fragment shader sequentially to each pixel in its intrinsic gl_FragCoord.xy or gl_TexCoord.xy range and yields the final color of this very pixel as the result of complex transformations that you see in this fragment shader. Neither C nor Asm can compete on the 4 to 8 CPU cores with GLSL speed (though fragment shader code is relatively easy to port to at least ANSI C) because GLSL uses
hundreds if not
thousands of cores available on modern (nVidia) GT
X GPUs for parallel processing in real time, and even so GLSL programs may be difficult for your PC to render (see below).
Back to our OP Julias. What you see below is an animated 3D Juliabulb (cf. Mandelbulb) GLSL program. As usual for
Íñigo Quílez with his ray marching techniques, the vertex shader is nearly empty while the fragment shader is a killer.
.