Fermat
Classes | Enumerations | Functions
VertexGeometryModule

Detailed Description

One of the tricks to high performance rendering is tightly packing all necessary information, so as to consume as little bandwith and on-chip memory as possible. This module introduces two structures to do so to represent path vertex geometry:
  • VertexGeometryId: to encode the minimal amount of information needed to represent a point on a surface, or a hit in ray tracing parlance;
  • VertexGeometry: to encode a slightly expanded version on the local differential surface geometry at a point, including its tangent, binormal and normal, as well the local texture coordinates;

Classes

struct  VertexGeometry
 
struct  VertexGeometryId
 
struct  VertexStorageView
 
struct  VertexStorage
 

Enumerations

enum  VertexSampling { kAll = 0, kEnd = 1 }
 
enum  VertexOrdering { kRandomOrdering = 0, kPathOrdering = 1 }
 

Functions

FERMAT_HOST_DEVICE FERMAT_FORCEINLINE uint32 pack_direction (const cugar::Vector3f &dir)
 
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE cugar::Vector3f unpack_direction (const uint32 packed_dir)
 

Function Documentation

◆ pack_direction()

FERMAT_HOST_DEVICE FERMAT_FORCEINLINE uint32 pack_direction ( const cugar::Vector3f dir)

pack a normalized direction vector in 32-bits

◆ unpack_direction()

FERMAT_HOST_DEVICE FERMAT_FORCEINLINE cugar::Vector3f unpack_direction ( const uint32  packed_dir)

unpack a 32-bits normalized direction vector