Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "raymarch/scene"

Index

Functions

Functions

Const raymarchScene

  • Higher order function producing a function to perform a raymarch using the provided scene function and options to configure the raymarch process itself.

    Returns an AST function which takes 2 args: ray origin, normalized ray direction and returning a 2D vector of:

    • x = the signed distance to the scene defined SDF surface
    • y = user data provided by scene (e.g. material ID)

    The scene function itself takes a 3D point as input and returns a vec2 with the same component meaning as above.

    Parameters

    Returns TaggedFn2<"vec3", "vec3", "vec2">

Generated using TypeDoc