Fermat
|
This module provides the core device functions available in BPTLib.
Classes | |
struct | PathWeights |
struct | TempPathWeights |
struct | LightVertex |
struct | EyeVertex |
Macros | |
#define | DEBUG_S -1 |
#define | DEBUG_T -1 |
#define | DEBUG_LENGTH 0 |
#define | MIN_G_DENOM 1.0e-8f |
Functions | |
template<typename TPrimaryCoordinates , typename TBPTContext , typename TBPTConfig > | |
FERMAT_HOST_DEVICE void | bpt::generate_primary_light_vertex (const uint32 light_path_id, const uint32 n_light_paths, const TPrimaryCoordinates &primary_coords, TBPTContext &context, RenderingContextView &renderer, TBPTConfig &config) |
template<typename TPrimaryCoordinates , typename TBPTContext , typename TBPTConfig > | |
FERMAT_HOST_DEVICE void | bpt::process_secondary_light_vertex (const uint32 queue_idx, const uint32 n_light_paths, const TPrimaryCoordinates &primary_coords, TBPTContext &context, RenderingContextView &renderer, TBPTConfig &config) |
template<typename TPrimaryCoordinates , typename TBPTContext , typename TBPTConfig > | |
FERMAT_HOST_DEVICE void | bpt::generate_primary_eye_vertex (const uint32 idx, const uint32 n_eye_paths, const uint32 n_light_paths, const TPrimaryCoordinates &primary_coords, TBPTContext &context, RenderingContextView &renderer, TBPTConfig &config) |
template<typename TSampleSink , typename TPrimaryCoordinates , typename TBPTContext , typename TBPTConfig > | |
FERMAT_HOST_DEVICE void | bpt::process_secondary_eye_vertex (const uint32 queue_idx, const uint32 n_eye_paths, const uint32 n_light_paths, TSampleSink &sample_sink, const TPrimaryCoordinates &primary_coords, TBPTContext &context, RenderingContextView &renderer, TBPTConfig &config) |
template<typename TBPTContext , typename TBPTConfig > | |
FERMAT_HOST_DEVICE void | bpt::connect_to_camera (const uint32 light_idx, const uint32 n_light_paths, TBPTContext &context, RenderingContextView &renderer, const TBPTConfig &config) |
template<typename TSampleSink , typename TBPTContext > | |
FERMAT_HOST_DEVICE void | bpt::solve_occlusion (const uint32 queue_idx, TSampleSink &sample_sink, TBPTContext &context, RenderingContextView &renderer) |
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE float | mis_selector (const uint32 s, const uint32 t, const float w) |
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE float | mis_power (const float w) |
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE float | bpt_mis (const float pGp, const float prev_pGp, const float next_pGp, const float pGp_sum) |
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE float | bpt_mis (const float pGp, const float other_pGp, const float pGp_sum) |
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE float | pdf_product (const float p1, const float p2) |
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE float | pdf_product (const float p1, const float p2, const float p3) |
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE uint32 | channel_selector (const Bsdf::ComponentType comp) |
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE uint4 | pack_edf (const Edf &edf) |
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE uint4 | pack_edf (const MeshMaterial &material) |
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE uint4 | pack_bsdf (const MeshMaterial &material) |
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE Edf | unpack_edf (const uint4 packed_info) |
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE Bsdf | unpack_bsdf (const RenderingContextView &renderer, const uint4 packed_info, const TransportType transport=kParticleTransport) |
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE cugar::Vector3f | unpack_bsdf_diffuse (const uint4 packed_info) |
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE cugar::Vector3f | unpack_bsdf_specular (const uint4 packed_info) |
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE float | unpack_bsdf_roughness (const uint4 packed_info) |
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE cugar::Vector3f | unpack_bsdf_diffuse_trans (const uint4 packed_info) |
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE cugar::Vector3f | bump_mapping (const VertexGeometryId &geom_id, const VertexGeometry &geom, const TextureReference &bump_map, const RenderingContextView &renderer) |
FERMAT_HOST_DEVICE void | eval_connection_terms (const EyeVertex ev, const LightVertex &lv, cugar::Vector3f &out, cugar::Vector3f &f_conn, float &G, float &d) |
FERMAT_HOST_DEVICE void | eval_connection_terms (const EyeVertex ev, const LightVertex &lv, cugar::Vector3f &out, cugar::Vector3f &f_conn, float &G, float &d, float &mis_w, bool RR=true, bool direct_lighting_nee=true, bool direct_lighting_bsdf=true) |
FERMAT_HOST_DEVICE void | eval_connection_terms (const EyeVertex ev, const LightVertex &lv, cugar::Vector3f &out, cugar::Vector3f &f_s, cugar::Vector3f &f_L, float &G, float &d, float &mis_w, bool RR=true, bool direct_lighting_nee=true, bool direct_lighting_bsdf=true) |
FERMAT_HOST_DEVICE void | eval_connection (const EyeVertex ev, const LightVertex &lv, cugar::Vector3f &out, cugar::Vector3f &out_w, float &d, bool RR=true, bool direct_lighting_nee=true, bool direct_lighting_bsdf=true) |
FERMAT_HOST_DEVICE cugar::Vector3f | eval_incoming_emission (const EyeVertex &ev, const RenderingContextView &renderer, bool direct_lighting_nee, bool indirect_lighting_nee, bool use_vpls) |
template<typename VertexType > | |
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE bool | scatter (const VertexType &v, const float z[3], Bsdf::ComponentType &out_component, cugar::Vector3f &out, float &out_p, float &out_p_proj, cugar::Vector3f &out_w, bool RR=true, bool output_alpha=true, bool evaluate_full_bsdf=false, Bsdf::ComponentType components=Bsdf::kAllComponents) |
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE cugar::Vector3f bump_mapping | ( | const VertexGeometryId & | geom_id, |
const VertexGeometry & | geom, | ||
const TextureReference & | bump_map, | ||
const RenderingContextView & | renderer | ||
) |
FERMAT_HOST_DEVICE void bpt::connect_to_camera | ( | const uint32 | light_idx, |
const uint32 | n_light_paths, | ||
TBPTContext & | context, | ||
RenderingContextView & | renderer, | ||
const TBPTConfig & | config | ||
) |
light_idx | the index of the light vertex in context.light_vertices |
n_light_paths | the total number of generated light subpaths |
context | the bidirectional path tracing context |
renderer | the rendering context |
config | the bidirectional path tracing configuration policy |
|
inline |
|
inline |
|
inline |
|
inline |
FERMAT_HOST_DEVICE void bpt::generate_primary_eye_vertex | ( | const uint32 | idx, |
const uint32 | n_eye_paths, | ||
const uint32 | n_light_paths, | ||
const TPrimaryCoordinates & | primary_coords, | ||
TBPTContext & | context, | ||
RenderingContextView & | renderer, | ||
TBPTConfig & | config | ||
) |
light_path_id | the id of the light subpath |
n_light_paths | the total number of generated light subpaths |
primary_coords | the primary sample space coordinates generator |
context | the bidirectional path tracing context |
renderer | the rendering context |
config | the bidirectional path tracing configuration policy |
FERMAT_HOST_DEVICE void bpt::generate_primary_light_vertex | ( | const uint32 | light_path_id, |
const uint32 | n_light_paths, | ||
const TPrimaryCoordinates & | primary_coords, | ||
TBPTContext & | context, | ||
RenderingContextView & | renderer, | ||
TBPTConfig & | config | ||
) |
light_path_id | the id of the light subpath |
n_light_paths | the total number of generated light subpaths |
primary_coords | the primary sample space coordinates generator |
context | the bidirectional path tracing context |
renderer | the rendering context |
config | the bidirectional path tracing configuration policy |
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE float mis_power | ( | const float | w | ) |
w
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE uint4 pack_bsdf | ( | const MeshMaterial & | material | ) |
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE uint4 pack_edf | ( | const Edf & | edf | ) |
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE uint4 pack_edf | ( | const MeshMaterial & | material | ) |
FERMAT_HOST_DEVICE void bpt::process_secondary_eye_vertex | ( | const uint32 | queue_idx, |
const uint32 | n_eye_paths, | ||
const uint32 | n_light_paths, | ||
TSampleSink & | sample_sink, | ||
const TPrimaryCoordinates & | primary_coords, | ||
TBPTContext & | context, | ||
RenderingContextView & | renderer, | ||
TBPTConfig & | config | ||
) |
queue_idx | the index of the queue entry |
n_eye_paths | the total number of generated eye subpaths |
n_light_paths | the total number of generated light subpaths |
sample_sink | the output sample sink, processing all bidirectional paths formed processing this vertex |
primary_coords | the primary sample space coordinates generator |
context | the bidirectional path tracing context |
renderer | the rendering context |
config | the bidirectional path tracing configuration policy |
FERMAT_HOST_DEVICE void bpt::process_secondary_light_vertex | ( | const uint32 | queue_idx, |
const uint32 | n_light_paths, | ||
const TPrimaryCoordinates & | primary_coords, | ||
TBPTContext & | context, | ||
RenderingContextView & | renderer, | ||
TBPTConfig & | config | ||
) |
queue_idx | the index of the queue entry |
n_light_paths | the total number of generated light subpaths |
primary_coords | the primary sample space coordinates generator |
context | the bidirectional path tracing context |
renderer | the rendering context |
config | the bidirectional path tracing configuration policy |
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE bool scatter | ( | const VertexType & | v, |
const float | z[3], | ||
Bsdf::ComponentType & | out_component, | ||
cugar::Vector3f & | out, | ||
float & | out_p, | ||
float & | out_p_proj, | ||
cugar::Vector3f & | out_w, | ||
bool | RR = true , |
||
bool | output_alpha = true , |
||
bool | evaluate_full_bsdf = false , |
||
Bsdf::ComponentType | components = Bsdf::kAllComponents |
||
) |
FERMAT_HOST_DEVICE void bpt::solve_occlusion | ( | const uint32 | queue_idx, |
TSampleSink & | sample_sink, | ||
TBPTContext & | context, | ||
RenderingContextView & | renderer | ||
) |
queue_idx | the index of the queue entry |
sample_sink | the output sample sink, processing all bidirectional paths formed processing this vertex |
context | the bidirectional path tracing context |
renderer | the rendering context |
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE Bsdf unpack_bsdf | ( | const RenderingContextView & | renderer, |
const uint4 | packed_info, | ||
const TransportType | transport = kParticleTransport |
||
) |
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE cugar::Vector3f unpack_bsdf_diffuse | ( | const uint4 | packed_info | ) |
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE cugar::Vector3f unpack_bsdf_diffuse_trans | ( | const uint4 | packed_info | ) |
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE float unpack_bsdf_roughness | ( | const uint4 | packed_info | ) |
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE cugar::Vector3f unpack_bsdf_specular | ( | const uint4 | packed_info | ) |
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE Edf unpack_edf | ( | const uint4 | packed_info | ) |