CauldronGPU.Light (CauldronGPU v0.3.3)

Copy Markdown View Source

A light in the scene. :directional lights shine along direction from everywhere; :point lights shine from position out to range; :spot lights also narrow to a cone around direction, full inside inner_cone radians and none past outer_cone. intensity scales color. The first directional light with shadows: true casts shadows.

Summary

Types

t()

@type t() :: %CauldronGPU.Light{
  color: vec3(),
  direction: vec3(),
  inner_cone: number(),
  intensity: number(),
  kind: :directional | :point | :spot,
  outer_cone: number(),
  position: vec3(),
  range: number(),
  shadows: boolean()
}

vec3()

@type vec3() :: {number(), number(), number()}