Accueil


samedi 7 mai 2016

Shadertoy #2 - Enter the Blob

This new shader (https://www.shadertoy.com/view/XdK3Rt) is about creating shapes with implicit surface functions. The result is quite funky but I had to make some rendering approximations to improve the performances of the shader and reach a correct fps (with my good ol' machine).

When a distance function is used to define surfaces, the raymarching algorithm can use this information. At each step of the ray march, the distance function gives the distance to the closest surface and consequently indicates the minimum step length to reach a surface (more information here).

The complex shape of my current shader is based on trigonometric functions. Moreover, the whole distance function is rotated with respect to the z axis to obtain this twisted shape. The problem is that the implicit surface function is deformed and is no more a real distance function. Hence, the raymarching optimization is no more available and a much smaller ray step has to be used... I should try some optimisations using derivatives of the pseudo-distance function.

So, I have reduced the step length and kepts a limited number of step, so surfaces far from the camera are not rendered and some artifact appear the surfaces.

It also needs some work on the colors.


The name of this shader is obviously related from the masterpiece Enter the void of Gaspar Noé :)

Aucun commentaire:

Enregistrer un commentaire