34 #include <tiled_sequence.h> 36 #include <renderer_interface.h> 83 void alloc(
const uint32 pixels)
86 m_gbuffer.alloc(pixels);
87 m_ebuffer.alloc(pixels);
88 m_weight.alloc(pixels);
89 m_weight2.alloc(pixels);
90 m_in_dir.alloc(pixels);
91 m_in_dir2.alloc(pixels);
92 m_in_alpha.alloc(pixels);
93 m_in_alpha2.alloc(pixels);
100 r.gbuffer = m_gbuffer.ptr();
101 r.ebuffer = m_ebuffer.ptr();
102 r.weight = m_weight.ptr();
103 r.weight2 = m_weight2.ptr();
104 r.in_dir = m_in_dir.ptr();
105 r.in_dir2 = m_in_dir2.ptr();
106 r.in_alpha = m_in_alpha.ptr();
107 r.in_alpha2 = m_in_alpha2.ptr();
117 uint32 max_path_length;
118 bool direct_lighting;
119 bool direct_lighting_nee;
120 bool direct_lighting_bsdf;
121 bool indirect_lighting_nee;
122 bool indirect_lighting_bsdf;
124 bool diffuse_scattering;
125 bool glossy_scattering;
126 bool indirect_glossy;
132 direct_lighting_nee(
true),
133 direct_lighting_bsdf(
true),
134 indirect_lighting_nee(
true),
135 indirect_lighting_bsdf(
true),
136 visible_lights(
true),
137 direct_lighting(
true),
138 diffuse_scattering(
true),
139 glossy_scattering(
true),
140 indirect_glossy(
false),
146 void parse(
const int argc,
char** argv)
148 for (
int i = 0; i < argc; ++i)
150 if (strcmp(argv[i],
"-pl") == 0 ||
151 strcmp(argv[i],
"-path-length") == 0 ||
152 strcmp(argv[i],
"-max-path-length") == 0)
153 max_path_length = atoi(argv[++i]);
154 else if (strcmp(argv[i],
"-bounces") == 0)
155 max_path_length = atoi(argv[++i]) + 1;
156 else if (strcmp(argv[i],
"-nee") == 0)
157 direct_lighting_nee = indirect_lighting_nee = atoi(argv[++i]) > 0;
158 else if (strcmp(argv[i],
"-bsdf") == 0)
159 direct_lighting_bsdf = indirect_lighting_bsdf = atoi(argv[++i]) > 0;
160 else if (strcmp(argv[i],
"-direct-nee") == 0)
161 direct_lighting_nee = atoi(argv[++i]) > 0;
162 else if (strcmp(argv[i],
"-direct-bsdf") == 0)
163 direct_lighting_bsdf = atoi(argv[++i]) > 0;
164 else if (strcmp(argv[i],
"-indirect-nee") == 0)
165 indirect_lighting_nee = atoi(argv[++i]) > 0;
166 else if (strcmp(argv[i],
"-indirect-bsdf") == 0)
167 indirect_lighting_bsdf = atoi(argv[++i]) > 0;
168 else if (strcmp(argv[i],
"-visible-lights") == 0)
169 visible_lights = atoi(argv[++i]) > 0;
170 else if (strcmp(argv[i],
"-direct-lighting") == 0)
171 direct_lighting = atoi(argv[++i]) > 0;
172 else if (strcmp(argv[i],
"-indirect-glossy") == 0)
173 indirect_glossy = atoi(argv[++i]) > 0;
174 else if (strcmp(argv[i],
"-diffuse") == 0)
175 diffuse_scattering = atoi(argv[++i]) > 0;
176 else if (strcmp(argv[i],
"-glossy") == 0)
177 glossy_scattering = atoi(argv[++i]) > 0;
178 else if (strcmp(argv[i],
"-rr") == 0)
179 rr = atoi(argv[++i]) > 0;
180 else if (strcmp(argv[i],
"-filter-width") == 0)
181 filter_width = (uint32)atof(argv[++i]);
182 else if (strcmp(argv[i],
"-tiled") == 0 ||
183 strcmp(argv[i],
"-tiled-reuse") == 0)
184 tiled_reuse = atoi(argv[++i]) > 0;
203 void setup_samples(
const uint32 instance);
void destroy()
Definition: rpt.h:205
Definition: tiled_sequence.h:131
Definition: renderer_interface.h:45
Definition: renderer.h:52
Defines several random samplers.