Part I: Fresnel

We must accept that fresnel nodes don’t exist in Godot visual shaders. Luckily it’s a very simple recipe, alluded to by my main man Mario in his tutorial.

Before I go on. If you want to see something on the screen, plug these li’l modules’ outputs into the emission port of your shader input.

To achieve the fresnel effect, we just need to subtract the dot product of the normal vector and the view vector from 1, illustrated below.

This makes sense because the normal vector or surface normal is a vector perpendicular to the object itself. Because we are using the dot product with the view it assures that the fresnel is always facing us.

If you look at what a fresnel effect is, we are just trying to constrain an effect, not necessarily reflection, to the outer edges of a surface dependent on what angle we’re viewing it at. Subtracting this dot product from 1 almost “inverts” our lower bounded values to the inside.

If we didn’t do that subtraction, our darker values would exist on the edges of the sphere and that would give us a “dark ring” instead.

I DON’T WANT IT

It should look like this, with the darker values forming a circle in the center: