160 const std::string&
name,
180 void cache_uniforms()
183 cache_uniform(program.get(), u_ssr_params,
"u_ssr_params", gfx::uniform_type::Vec4);
184 cache_uniform(program.get(), u_hiz_params,
"u_hiz_params", gfx::uniform_type::Vec4);
185 cache_uniform(program.get(), u_fade_params,
"u_fade_params", gfx::uniform_type::Vec4);
186 cache_uniform(program.get(), u_cone_params,
"u_cone_params", gfx::uniform_type::Vec4);
187 cache_uniform(program.get(), u_prev_view_proj,
"u_prev_view_proj", gfx::uniform_type::Mat4);
188 cache_uniform(program.get(), s_color,
"s_color", gfx::uniform_type::Sampler);
189 cache_uniform(program.get(), s_normal,
"s_normal", gfx::uniform_type::Sampler);
190 cache_uniform(program.get(), s_depth,
"s_depth", gfx::uniform_type::Sampler);
191 cache_uniform(program.get(), s_hiz,
"s_hiz", gfx::uniform_type::Sampler);
192 cache_uniform(program.get(), s_color_blurred,
"s_color_blurred", gfx::uniform_type::Sampler);
195 auto is_valid() const ->
bool
197 return program && program->is_valid();
199 } fidelityfx_pixel_program_;
202 struct temporal_resolve_program : uniforms_cache
214 void cache_uniforms()
216 cache_uniform(program.get(), u_temporal_params,
"u_temporal_params", gfx::uniform_type::Vec4);
217 cache_uniform(program.get(), u_motion_params,
"u_motion_params", gfx::uniform_type::Vec4);
218 cache_uniform(program.get(), u_fade_params,
"u_fade_params", gfx::uniform_type::Vec4);
219 cache_uniform(program.get(), u_prev_view_proj,
"u_prev_view_proj", gfx::uniform_type::Mat4);
220 cache_uniform(program.get(), s_ssr_curr,
"s_ssr_curr", gfx::uniform_type::Sampler);
221 cache_uniform(program.get(), s_ssr_history,
"s_ssr_history", gfx::uniform_type::Sampler);
222 cache_uniform(program.get(), s_normal,
"s_normal", gfx::uniform_type::Sampler);
223 cache_uniform(program.get(), s_depth,
"s_depth", gfx::uniform_type::Sampler);
226 auto is_valid() const ->
bool
228 return program && program->is_valid();
230 } temporal_resolve_program_;
233 struct composite_program : uniforms_cache
241 void cache_uniforms()
243 cache_uniform(program.get(), s_ssr_history,
"s_ssr_history", gfx::uniform_type::Sampler);
244 cache_uniform(program.get(), s_ssr_curr,
"s_ssr_curr", gfx::uniform_type::Sampler);
245 cache_uniform(program.get(), s_normal,
"s_normal", gfx::uniform_type::Sampler);
246 cache_uniform(program.get(), s_depth,
"s_depth", gfx::uniform_type::Sampler);
249 auto is_valid() const ->
bool
251 return program && program->is_valid();
253 } composite_program_;
256 struct blur_compute_program : uniforms_cache
262 void cache_uniforms()
264 cache_uniform(program.get(), u_blur_params,
"u_blur_params", gfx::uniform_type::Vec4);
265 cache_uniform(program.get(), s_normal,
"s_normal", gfx::uniform_type::Sampler);
268 auto is_valid() const ->
bool
270 return program && program->is_valid();
273 blur_compute_program blur_compute_program_;
276 struct spatial_denoise_compute_program : uniforms_cache
284 void cache_uniforms()
286 cache_uniform(program.get(), u_denoise_params,
"u_denoise_params", gfx::uniform_type::Vec4);
287 cache_uniform(program.get(), s_ssr_input,
"s_ssr_input", gfx::uniform_type::Sampler);
288 cache_uniform(program.get(), s_normal,
"s_normal", gfx::uniform_type::Sampler);
289 cache_uniform(program.get(), s_depth,
"s_depth", gfx::uniform_type::Sampler);
292 auto is_valid() const ->
bool
294 return program && program->is_valid();
297 spatial_denoise_compute_program spatial_denoise_compute_program_;