Tag: ray marching boolean operators
-
Ray Marching Shader pt.5 (Colors)

These ray marching shader examples show a couple of different methods of adding colors to ray marched objects. The first example shows how instead of returning only floats for distances with the distance functions from previous examples we can also include colors into the calculations by using a vec4 data…
-
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…
-
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…