Public Methods | Public Members | Static Public Members | List of all members
DirectLightingMesh Struct Reference

Detailed description

A model of TPTDirectLightingSampler, implementing NEE sample generation from an emissive mesh

#include <direct_lighting_mesh.h>

Public Methods

FERMAT_HOST_DEVICE DirectLightingMesh ()
FERMAT_HOST_DEVICE DirectLightingMesh (const MeshLight _mesh_light)
FERMAT_DEVICE uint32 preprocess_vertex (const RenderingContextView &renderer, const EyeVertex &ev, const uint32 pixel, const uint32 bounce, const bool is_secondary_diffuse, const float cone_radius, const cugar::Bbox3f scene_bbox)
FERMAT_DEVICE uint32 sample (const uint32 nee_slot, const float z[3], VertexGeometryId *light_vertex, VertexGeometry *light_vertex_geom, float *light_pdf, Edf *light_edf)
FERMAT_DEVICE void map (const uint32 prev_nee_slot, const uint32 triId, const cugar::Vector2f uv, const VertexGeometry light_vertex_geom, float *light_pdf, Edf *light_edf)
FERMAT_DEVICE void update (const uint32 nee_slot, const uint32 nee_sample, const cugar::Vector3f w, const bool occluded)

Public Members

MeshLight mesh_light

Static Public Members

static const uint32 INVALID_SLOT = 0xFFFFFFFF
static const uint32 INVALID_SAMPLE = 0xFFFFFFFF

Constructor & Destructor Documentation

◆ DirectLightingMesh() [1/2]

FERMAT_HOST_DEVICE DirectLightingMesh::DirectLightingMesh ( )

empty constructor

◆ DirectLightingMesh() [2/2]

FERMAT_HOST_DEVICE DirectLightingMesh::DirectLightingMesh ( const MeshLight  _mesh_light)


Member Function Documentation

◆ map()

FERMAT_DEVICE void DirectLightingMesh::map ( const uint32  prev_nee_slot,
const uint32  triId,
const cugar::Vector2f  uv,
const VertexGeometry  light_vertex_geom,
float *  light_pdf,
Edf light_edf 

map a light vertex at the slot given at the previous vertex

◆ preprocess_vertex()

FERMAT_DEVICE uint32 DirectLightingMesh::preprocess_vertex ( const RenderingContextView renderer,
const EyeVertex ev,
const uint32  pixel,
const uint32  bounce,
const bool  is_secondary_diffuse,
const float  cone_radius,
const cugar::Bbox3f  scene_bbox 

preprocess a path vertex and return a hash slot used for NEE

◆ sample()

FERMAT_DEVICE uint32 DirectLightingMesh::sample ( const uint32  nee_slot,
const float  z[3],
VertexGeometryId light_vertex,
VertexGeometry light_vertex_geom,
float *  light_pdf,
Edf light_edf 

sample a light vertex at a given slot

◆ update()

FERMAT_DEVICE void DirectLightingMesh::update ( const uint32  nee_slot,
const uint32  nee_sample,
const cugar::Vector3f  w,
const bool  occluded 

update with the resulting NEE sample

The documentation for this struct was generated from the following file: