Skip to main content

packed_shape_code

Function packed_shape_code 

Source
pub fn packed_shape_code(kind: OccluderKind) -> f32
Expand description

Returns the f32 discriminator both shaders switch on for an OccluderKind.

§Arguments

  • OccluderKind - The source shape.

§Returns

  • f32 - The shader discriminator: sphere 0.0, AABB 1.0, triangle 2.0.