trouble grasping those shaders
Posted: Thu Dec 18, 2014 1:49 am
I've been looking a lot at the shaders at shadertoy.com and was wondering: theyre written in GLSL right? how does that differ to FFGL plugins, and how do they create entire 3d models with just a few lines of code? there's all that abstract procedural stuff, but there are also pianos, walking characters, buildings and so on. how does that even work? i'm quite the amateur: i know of 3d models and textures, that can be used in realtime applications like games, but they need to be made beforehand. then i know of procedural generation of 3d objects like a minecraft terrain, that is created on the fly based on some algorithms (like those 3d mandelbrots). dont understand those algorithms, but it makes still sense. i also know of raytracing and all that physical calculation stuff that can be done in realtime like shadows, reflections, etc.
that would explain those terrain shaders or cloud shaders or fractal shaders and such on shadertoy. but then there're these https://www.shadertoy.com/view/MsXGWr, https://www.shadertoy.com/view/ldsGWB, https://www.shadertoy.com/view/MdXGW2, https://www.shadertoy.com/view/ldl3zN which i cant grasp at all. how do you make specific forms like a car or a piano ? and i wont even start on animating those objects.. ^^ apparently exepct from images, no external sources are used, so they have to be created in those lines of code somehow.
from my point of knowledge you could maybe give coordinates for polygons and their vertices, but there doesnt seem to be something like this in the code.
or am i thinking in the wrong direction at all, and it's all fake and just imitates looking like actual objects?
also: those shaders are written in GLSL right? what exactly are those FFGL plugins then, is FFGL also a shader language?
if anyone knows more of these underlying principles, i'd be happy if you could enlighten me
that would explain those terrain shaders or cloud shaders or fractal shaders and such on shadertoy. but then there're these https://www.shadertoy.com/view/MsXGWr, https://www.shadertoy.com/view/ldsGWB, https://www.shadertoy.com/view/MdXGW2, https://www.shadertoy.com/view/ldl3zN which i cant grasp at all. how do you make specific forms like a car or a piano ? and i wont even start on animating those objects.. ^^ apparently exepct from images, no external sources are used, so they have to be created in those lines of code somehow.
from my point of knowledge you could maybe give coordinates for polygons and their vertices, but there doesnt seem to be something like this in the code.
or am i thinking in the wrong direction at all, and it's all fake and just imitates looking like actual objects?
also: those shaders are written in GLSL right? what exactly are those FFGL plugins then, is FFGL also a shader language?
if anyone knows more of these underlying principles, i'd be happy if you could enlighten me