Fermat
Modules | Classes | Macros | Functions | Variables
PTLib

Detailed Description

Modules

 PTLibCore
 

Classes

struct  DirectLightingMesh
 
struct  DirectLightingRL
 
struct  PTContextQueues
 
struct  PTLoopStats
 
struct  PTRayQueue
 
struct  PTVertexProcessor
 

Macros

#define SHADE_HITS_BLOCKSIZE   64
 
#define SHADE_HITS_CTA_BLOCKS   8
 

Functions

void alloc_queues (PTOptions options, const uint32 n_pixels, PTRayQueue &input_queue, PTRayQueue &scatter_queue, PTRayQueue &shadow_queue, cugar::memory_arena &arena)
 
template<typename TPTContext >
__global__ void generate_primary_rays_kernel (TPTContext context, RenderingContextView renderer, cugar::Vector3f U, cugar::Vector3f V, cugar::Vector3f W, const float W_len, const float square_pixel_focal_length)
 
template<typename TPTContext >
void generate_primary_rays (TPTContext context, const RenderingContextView renderer)
 
template<uint32 NUM_WARPS, typename TPTContext , typename TPTVertexProcessor >
__global__ __launch_bounds__ (SHADE_HITS_BLOCKSIZE, SHADE_HITS_CTA_BLOCKS) void shade_hits_kernel(const uint32 in_queue_size
 
 if (thread_id< in_queue_size)
 
template<typename TPTContext , typename TPTVertexProcessor >
void shade_hits (const uint32 in_queue_size, TPTContext context, TPTVertexProcessor vertex_processor, RenderingContextView renderer)
 
template<typename TPTContext , typename TPTVertexProcessor >
__global__ void solve_occlusion_kernel (const uint32 in_queue_size, TPTContext context, TPTVertexProcessor vertex_processor, RenderingContextView renderer)
 
template<typename TPTContext , typename TPTVertexProcessor >
void solve_occlusion (const uint32 in_queue_size, TPTContext context, TPTVertexProcessor vertex_processor, RenderingContextView renderer)
 
template<typename TPTContext , typename TPTVertexProcessor >
void path_trace_loop (TPTContext &context, TPTVertexProcessor &vertex_processor, RenderingContext &renderer, RenderingContextView &renderer_view, PTLoopStats &stats)
 
void print_timer_stats (const uint64 *device_timers, const PTLoopStats &stats)
 

Variables

__global__ TPTContext context
 
__global__ TPTContext TPTVertexProcessor vertex_processor
 
__global__ TPTContext TPTVertexProcessor RenderingContextView renderer
 

Function Documentation

◆ __launch_bounds__()

template<uint32 NUM_WARPS, typename TPTContext , typename TPTVertexProcessor >
__global__ __launch_bounds__ ( SHADE_HITS_BLOCKSIZE  ,
SHADE_HITS_CTA_BLOCKS   
) const

a kernel to shade all path tracing hits

Template Parameters
TPTContextA path tracing context, which must adhere to the TPTContext interface
TPTVertexProcessorA vertex processor, which must adhere to the TPTVertexProcessor interface

◆ alloc_queues()

void alloc_queues ( PTOptions  options,
const uint32  n_pixels,
PTRayQueue input_queue,
PTRayQueue scatter_queue,
PTRayQueue shadow_queue,
cugar::memory_arena arena 
)
inline

a utility function to alloc the path tracing queues

◆ generate_primary_rays()

template<typename TPTContext >
void generate_primary_rays ( TPTContext  context,
const RenderingContextView  renderer 
)

dispatch the kernel to generate primary rays

Template Parameters
TPTContextA path tracing context

◆ generate_primary_rays_kernel()

template<typename TPTContext >
__global__ void generate_primary_rays_kernel ( TPTContext  context,
RenderingContextView  renderer,
cugar::Vector3f  U,
cugar::Vector3f  V,
cugar::Vector3f  W,
const float  W_len,
const float  square_pixel_focal_length 
)

a kernel to generate primary rays

Template Parameters
TPTContextA path tracing context

◆ path_trace_loop()

template<typename TPTContext , typename TPTVertexProcessor >
void path_trace_loop ( TPTContext &  context,
TPTVertexProcessor &  vertex_processor,
RenderingContext renderer,
RenderingContextView renderer_view,
PTLoopStats stats 
)

main path tracing loop

◆ shade_hits()

template<typename TPTContext , typename TPTVertexProcessor >
void shade_hits ( const uint32  in_queue_size,
TPTContext  context,
TPTVertexProcessor  vertex_processor,
RenderingContextView  renderer 
)

dispatch the shade hits kernel

Template Parameters
TPTContextA path tracing context, which must adhere to the TPTContext interface
TPTVertexProcessorA vertex processor, which must adhere to the TPTVertexProcessor interface

◆ solve_occlusion()

template<typename TPTContext , typename TPTVertexProcessor >
void solve_occlusion ( const uint32  in_queue_size,
TPTContext  context,
TPTVertexProcessor  vertex_processor,
RenderingContextView  renderer 
)

dispatch a kernel to process NEE samples using computed occlusion information

Template Parameters
TPTContextA path tracing context, which must adhere to the TPTContext interface
TPTVertexProcessorA vertex processor, which must adhere to the TPTVertexProcessor interface

◆ solve_occlusion_kernel()

template<typename TPTContext , typename TPTVertexProcessor >
__global__ void solve_occlusion_kernel ( const uint32  in_queue_size,
TPTContext  context,
TPTVertexProcessor  vertex_processor,
RenderingContextView  renderer 
)

a kernel to process NEE samples using computed occlusion information

Template Parameters
TPTContextA path tracing context, which must adhere to the TPTContext interface
TPTVertexProcessorA vertex processor, which must adhere to the TPTVertexProcessor interface

Variable Documentation

◆ renderer

__global__ TPTContext TPTVertexProcessor RenderingContextView renderer
Initial value:
{
const uint32 thread_id = threadIdx.x + blockIdx.x * blockDim.x