diff options
author | Sebastian Herhoz <sebastian.herholz@intel.com> | 2022-09-21 18:58:34 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-09-27 16:56:32 +0300 |
commit | 75a6d3abf75f3082adf5240ae34973844c0d9a09 (patch) | |
tree | 6967aea2480187db007cdc003bad14fbb372570d /intern/cycles/kernel/data_template.h | |
parent | 6d19da0b2d468f099e0c1f56392ab8a1750d114f (diff) |
Cycles: add Path Guiding on CPU through Intel OpenPGL
This adds path guiding features into Cycles by integrating Intel's Open Path
Guiding Library. It can be enabled in the Sampling > Path Guiding panel in the
render properties.
This feature helps reduce noise in scenes where finding a path to light is
difficult for regular path tracing.
The current implementation supports guiding directional sampling decisions on
surfaces, when the material contains a least one diffuse component, and in
volumes with isotropic and anisotropic Henyey-Greenstein phase functions.
On surfaces, the guided sampling decision is proportional to the product of
the incident radiance and the normal-oriented cosine lobe and in volumes it
is proportional to the product of the incident radiance and the phase function.
The incident radiance field of a scene is learned and updated during rendering
after each per-frame rendering iteration/progression.
At the moment, path guiding is only supported by the CPU backend. Support for
GPU backends will be added in future versions of OpenPGL.
Ref T92571
Differential Revision: https://developer.blender.org/D15286
Diffstat (limited to 'intern/cycles/kernel/data_template.h')
-rw-r--r-- | intern/cycles/kernel/data_template.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/intern/cycles/kernel/data_template.h b/intern/cycles/kernel/data_template.h index 807d0650fc3..1e9e25f2f9d 100644 --- a/intern/cycles/kernel/data_template.h +++ b/intern/cycles/kernel/data_template.h @@ -133,6 +133,10 @@ KERNEL_STRUCT_MEMBER(film, int, pass_bake_primitive) KERNEL_STRUCT_MEMBER(film, int, pass_bake_differential) /* Shadow catcher. */ KERNEL_STRUCT_MEMBER(film, int, use_approximate_shadow_catcher) +/* Path Guiding */ +KERNEL_STRUCT_MEMBER(film, int, pass_guiding_color) +KERNEL_STRUCT_MEMBER(film, int, pass_guiding_probability) +KERNEL_STRUCT_MEMBER(film, int, pass_guiding_avg_roughness) /* Padding. */ KERNEL_STRUCT_MEMBER(film, int, pad1) KERNEL_STRUCT_MEMBER(film, int, pad2) @@ -190,8 +194,17 @@ KERNEL_STRUCT_MEMBER(integrator, int, has_shadow_catcher) KERNEL_STRUCT_MEMBER(integrator, int, filter_closures) /* MIS debugging. */ KERNEL_STRUCT_MEMBER(integrator, int, direct_light_sampling_type) -/* Padding */ -KERNEL_STRUCT_MEMBER(integrator, int, pad1) + +/* Path Guiding */ +KERNEL_STRUCT_MEMBER(integrator, float, surface_guiding_probability) +KERNEL_STRUCT_MEMBER(integrator, float, volume_guiding_probability) +KERNEL_STRUCT_MEMBER(integrator, int, guiding_distribution_type) +KERNEL_STRUCT_MEMBER(integrator, int, use_guiding) +KERNEL_STRUCT_MEMBER(integrator, int, train_guiding) +KERNEL_STRUCT_MEMBER(integrator, int, use_surface_guiding) +KERNEL_STRUCT_MEMBER(integrator, int, use_volume_guiding) +KERNEL_STRUCT_MEMBER(integrator, int, use_guiding_direct_light) +KERNEL_STRUCT_MEMBER(integrator, int, use_guiding_mis_weights) KERNEL_STRUCT_END(KernelIntegrator) /* SVM. For shader specialization. */ |