User:Jbakker/projects/CyclesOpenCL2019/ProRender
< User:Jbakker | projects | CyclesOpenCL2019
Render loop
ProRender has an Adaptive renderer and a Monte carlo based renderer. We focus on the Monte Carlo based renderer.
- for each tile
- generate tile domain (
GenerateTileDomain
; updates a list of indices (every output pixels gets a number), this index is used to reduce the work-group/item lookup in other kernels) - generate prim rays; Based on the type of camera the primary rays are generated. Every type of camera has its own Kernel (
PerspectiveCamera_GeneratePaths
,PerspectiveCameraDof_GeneratePaths
,OrthographicCamera_GeneratePaths
) - estimate
- InitPathData
InitPathData
- for each pass
- Clear ray hit buffer
- Query intersection: provided by RadeonRays
- Sample volume
SampleVolume
; Applies volume effects (absorbtion, emission) and scattering, also happens for missed rays. - Shade miss (environment)
ShadeMiss
Illuminate missing rays - Filter path stream
FilterPathStream
; convert intersections to predicates (Kill, Alive) - Gather Opacity (optional)
GatherOpacity
; Gather opacity information and store it in opacity buffer - Compact batch: provided by RadeonRays
- Advance indices to keep pixel indices up to date
RestorePixelIndices
; - Shade miss primary ray (background)
ShadeBackgroundEnvMap
; Illuminate missing rays - Shade volume
ShadeVolumeUberV2
; It applies direct illumination and generates (only scattered paths) - Shade surface
ShadeSurfaceUberV2
; Handle ray-surface interaction possibly generating path continuation - for each transmission step
- QueryIntersection
- Apply volume transmission
ApplyVolumeTransmissionUberV2
; Handle light samples and visibility info and add contribution to final buffer
- Query occlusion (shadow rays): provided by RadeonRays
- Gather light samples
GatherLightSamples
; Handle light samples and visibility info and add contribution to final buffer - Gather visibility (optional)
GatherVisibility
; Handle light samples and visibility info and add contribution to final buffer
- Gather opacity
GatherOpacity
; Gather opacity information and store it in opacity buffer
- InitPathData
- Fill AOV's
GenerateTileDomain
,GeneratePrimaryRays
,FillAOVsUberV2
- generate tile domain (
Note: Source code of shaders is generated from the materials. Data of the shaders are passed along. So perhaps only a recompilation if the material is restructured?