Basic RayMarching Shader pt.4 (3D Primitive Shapes)

These examples show a collection of different distance functions for basic 3D primitive shapes and how they can be implemented in a ray marching shader. Keep in mind that many more shapes can be created by combining them together with other distance functions like boolean and smooth blending operators. All of the distance functions can... Continue Reading →

Basic RayMarching Shader pt.3 (Smooth Blending Operators)

These examples show smooth blending versions of the boolean distance functions for intersection, union and subtraction. These functions can be used to blend different objects together smoothly to create complex organic looking shapes. The functions can be used in the same way as the boolean intersection, union and subtraction operators but have an extra parameter... Continue Reading →

Basic RayMarching Shader pt.2 (Boolean Operators)

These examples show how boolean operators can be used to create complex shapes from simple ones. This 3d-modelling method is called CSG (Constructive solid geometry). CSG is primarily built on 3 primitive operations named intersection ( ∩ ), union ( ∪ ), and difference ( − ).The diagram below shows an example of what is possible with using this technique: source:... Continue Reading →

Basic RayMarching Shader (GLSL)

On this page, the coding steps to produce a basic Ray Marching fragment shader, that creates a ray marched scene of a sphere and a plane, with basic diffuse directional lighting and shadows.If you quickly want to try out the examples I recommend the web based GLSL editor from the book of shaders over here:... Continue Reading →

Powered by

Up ↑