Raymarcher Primitive SDFs
Namespace: Raymarcher.Objects.Primitives
Raymarcher features a diverse collection of primitive SDF objects. These objects, defined within Raymarcher, inherit from the base class RMSdfObjectBase.
To create a primitive object in the Unity editor, navigate to GameObject/Raymarcher/Primitives.
It's important to note that creating Raymarcher objects at runtime is not possible. Each object must be created at compile time.
Simple sphere/capsule signed distance function.
public float sphereRadius;
public float sphereHeight;
Simple rounded/sharp cube/rectangle signed distance function.
public float cubeSizeUniform;
public Vector3 cubeSize;
public float cubeRoundness;
Cube-frame signed distance function.
public float cubeSizeUniform;
public Vector3 cubeSize;
public float cubeRoundness;
public float frameSize;
Two pointed line signed distance function. Use pointA/pointB Transform to update the line point with the external transform.
public float thicknessA;
public float thicknessB;
public Vector3 pointA;
public Vector3 pointB;
public Transform pointATransform;
public Transform pointBTransform;
Simple cone signed distance function.
public float coneSize;
public float coneHeight;
Simple torus/donut signed distance function.
public float torusRadius;
public float torusThickness;
public float torusHeight;
Metaballs signed distance function consisting of three blended sphere sdfs.
public float metaballRadius;
public float metaballSizeVariation;
public float metaballSpacing;
public float metaballMaxHeight;
public float metaballFloatingSpeed;
public float metaballSmoothness;