30 #include <pathtracer_core.h> 56 template <
typename PTContext>
59 const PTContext& context,
63 const float cone_radius,
65 const uint32 prev_vertex_info,
69 return uint32(0xFFFFFFFF);
87 template <
typename PTContext>
90 const PTContext& context,
93 const uint32 prev_vertex_info,
94 const uint32 vertex_info,
102 uint32& out_vertex_info)
105 out_w_d = (context.in_bounce == 0 ? f_d : f_d + f_g) * w * f_L;
106 out_w_g = (context.in_bounce == 0 ? f_g : f_d + f_g) * w * f_L;
107 out_vertex_info = 0xFFFFFFFF;
126 template <
typename PTContext>
129 const PTContext& context,
132 const uint32 prev_vertex_info,
133 const uint32 vertex_info,
135 const uint32 out_comp,
139 uint32& out_vertex_info)
142 out_vertex_info = 0xFFFFFFFF;
156 template <
typename PTContext>
159 const PTContext& context,
162 const uint32 prev_vertex_info,
163 const uint32 vertex_info,
173 const uint32 pixel_index = pixel_info.pixel;
174 const uint32 pixel_comp = pixel_info.comp;
175 const float frame_weight = context.frame_weight;
178 add_in<false>(composited_channel, pixel_index, w, frame_weight);
181 if (context.in_bounce == 0)
182 add_in<false>(direct_channel, pixel_index, w, frame_weight);
185 if (pixel_comp & Bsdf::kDiffuseMask) add_in<true>(diffuse_channel, pixel_index, w, frame_weight);
186 if (pixel_comp & Bsdf::kGlossyMask) add_in<true>(specular_channel, pixel_index, w, frame_weight);
202 template <
typename PTContext>
205 const PTContext& context,
208 const uint32 vertex_info,
209 const bool shadow_hit,
213 if (shadow_hit ==
false)
220 const uint32 pixel_index = pixel_info.pixel;
221 const uint32 pixel_comp = pixel_info.comp;
222 const float frame_weight = context.frame_weight;
224 add_in<false>( composited_channel, pixel_index, w_d + w_g, frame_weight );
226 if (context.in_bounce == 0)
229 add_in<true>( diffuse_channel, pixel_index, w_d, frame_weight );
230 add_in<true>( specular_channel, pixel_index, w_g, frame_weight );
235 if (pixel_comp & Bsdf::kDiffuseMask) add_in<true>( diffuse_channel, pixel_index, w_d, frame_weight );
236 if (pixel_comp & Bsdf::kGlossyMask) add_in<true>( specular_channel, pixel_index, w_g, frame_weight );
FERMAT_DEVICE void accumulate_nee(const PTContext &context, RenderingContextView &renderer, const PixelInfo pixel_info, const uint32 vertex_info, const bool shadow_hit, const cugar::Vector3f &w_d, const cugar::Vector3f &w_g)
[PTVertexProcessor::accumulate_emissive]
Definition: pathtracer_vertex_processor.h:204
FERMAT_DEVICE uint32 preprocess_vertex(const PTContext &context, const RenderingContextView &renderer, const PixelInfo pixel_info, const EyeVertex &ev, const float cone_radius, const cugar::Bbox3f scene_bbox, const uint32 prev_vertex_info, const cugar::Vector3f w, const float p_prev)
Definition: pathtracer_vertex_processor.h:58
Definition: pathtracer_vertex_processor.h:46
Definition: framebuffer.h:274
FERMAT_DEVICE void compute_nee_weights(const PTContext &context, const RenderingContextView &renderer, const PixelInfo pixel_info, const uint32 prev_vertex_info, const uint32 vertex_info, const EyeVertex &ev, const cugar::Vector3f &f_d, const cugar::Vector3f &f_g, const cugar::Vector3f &w, const cugar::Vector3f &f_L, cugar::Vector3f &out_w_d, cugar::Vector3f &out_w_g, uint32 &out_vertex_info)
Definition: pathtracer_vertex_processor.h:89
Definition: bpt_utils.h:583
Definition: framebuffer.h:125
Definition: pathtracer_core.h:527
FERMAT_DEVICE void accumulate_emissive(const PTContext &context, RenderingContextView &renderer, const PixelInfo pixel_info, const uint32 prev_vertex_info, const uint32 vertex_info, const EyeVertex &ev, const cugar::Vector3f &w)
[PTVertexProcessor::compute_scattering_weights]
Definition: pathtracer_vertex_processor.h:158
Definition: renderer_view.h:80
FERMAT_DEVICE void compute_scattering_weights(const PTContext &context, const RenderingContextView &renderer, const PixelInfo pixel_info, const uint32 prev_vertex_info, const uint32 vertex_info, const EyeVertex &ev, const uint32 out_comp, const cugar::Vector3f &g, const cugar::Vector3f &w, cugar::Vector3f &out_w, uint32 &out_vertex_info)
[PTVertexProcessor::compute_nee_weights]
Definition: pathtracer_vertex_processor.h:128