forked from BachiLi/redner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpath_contribution.h
65 lines (61 loc) · 3.62 KB
/
path_contribution.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#pragma once
#include "redner.h"
#include "buffer.h"
#include "ray.h"
#include "intersection.h"
#include "shape.h"
#include "texture.h"
#include "area_light.h"
#include "material.h"
struct Scene;
struct ChannelInfo;
struct DScene;
/// Compute the contribution at a path vertex, by combining next event estimation & BSDF sampling.
void accumulate_path_contribs(const Scene &scene,
const BufferView<int> &active_pixels,
const BufferView<Vector3> &throughputs,
const BufferView<Ray> &incoming_rays,
const BufferView<Intersection> &shading_isects,
const BufferView<SurfacePoint> &shading_points,
const BufferView<Intersection> &light_isects,
const BufferView<SurfacePoint> &light_points,
const BufferView<Ray> &light_rays,
const BufferView<Intersection> &bsdf_isects,
const BufferView<SurfacePoint> &bsdf_points,
const BufferView<Ray> &bsdf_rays,
const BufferView<Real> &min_roughness,
const Real weight,
const ChannelInfo &channel_info,
BufferView<Vector3> next_throughputs,
float *rendered_image,
BufferView<Real> edge_contribs);
/// The backward version of the function above.
void d_accumulate_path_contribs(const Scene &scene,
const BufferView<int> &active_pixels,
const BufferView<Vector3> &throughputs,
const BufferView<Ray> &incoming_rays,
const BufferView<RayDifferential> &ray_differentials,
const BufferView<LightSample> &light_samples,
const BufferView<BSDFSample> &bsdf_samples,
const BufferView<Intersection> &shading_isects,
const BufferView<SurfacePoint> &shading_points,
const BufferView<Intersection> &light_isects,
const BufferView<SurfacePoint> &light_points,
const BufferView<Ray> &light_rays,
const BufferView<Intersection> &bsdf_isects,
const BufferView<SurfacePoint> &bsdf_points,
const BufferView<Ray> &bsdf_rays,
const BufferView<RayDifferential> &bsdf_ray_differentials,
const BufferView<Real> &min_roughness,
const Real weight,
const ChannelInfo &channel_info,
const float *d_rendered_image,
const BufferView<Vector3> &d_next_throughputs,
const BufferView<DRay> &d_next_rays,
const BufferView<RayDifferential> &d_next_ray_differentials,
const BufferView<SurfacePoint> &d_next_points,
DScene *d_scene,
BufferView<Vector3> d_throughputs,
BufferView<DRay> d_incoming_rays,
BufferView<RayDifferential> d_incoming_ray_differentials,
BufferView<SurfacePoint> d_shading_points);