vk: rt: allow disabling temporal denoiser
This commit is contained in:
parent
036379707d
commit
2139b32f75
|
@ -229,6 +229,11 @@ void main() {
|
||||||
|
|
||||||
vec3 colour = vec3(0.);
|
vec3 colour = vec3(0.);
|
||||||
{
|
{
|
||||||
|
vec3 diffuse = c.direct_diffuse + c.indirect_diffuse;
|
||||||
|
vec3 specular = c.direct_specular + c.indirect_specular;
|
||||||
|
|
||||||
|
//#define DISABLE_TEMPORAL_DENOISER
|
||||||
|
#ifndef DISABLE_TEMPORAL_DENOISER
|
||||||
// TODO: need to extract reprojecting from this shader because reprojected stuff need svgf denoising pass after it
|
// TODO: need to extract reprojecting from this shader because reprojected stuff need svgf denoising pass after it
|
||||||
const vec3 origin = (ubo.ubo.inv_view * vec4(0., 0., 0., 1.)).xyz;
|
const vec3 origin = (ubo.ubo.inv_view * vec4(0., 0., 0., 1.)).xyz;
|
||||||
const vec3 position = imageLoad(position_t, pix).xyz;
|
const vec3 position = imageLoad(position_t, pix).xyz;
|
||||||
|
@ -242,8 +247,6 @@ void main() {
|
||||||
const float depth_treshold = 0.01 * clip_space.w;
|
const float depth_treshold = 0.01 * clip_space.w;
|
||||||
|
|
||||||
float better_depth_offset = depth_treshold;
|
float better_depth_offset = depth_treshold;
|
||||||
vec3 diffuse = c.direct_diffuse + c.indirect_diffuse;
|
|
||||||
vec3 specular = c.direct_specular + c.indirect_specular;
|
|
||||||
vec3 history_diffuse = diffuse;
|
vec3 history_diffuse = diffuse;
|
||||||
vec3 history_specular = specular;
|
vec3 history_specular = specular;
|
||||||
const int TEMPORAL_KERNEL = 1; // lifekilled says it should be fixed
|
const int TEMPORAL_KERNEL = 1; // lifekilled says it should be fixed
|
||||||
|
@ -272,6 +275,7 @@ void main() {
|
||||||
|
|
||||||
imageStore(out_temporal_diffuse, pix, vec4(diffuse, depth));
|
imageStore(out_temporal_diffuse, pix, vec4(diffuse, depth));
|
||||||
imageStore(out_temporal_specular, pix, vec4(specular, 0./*unused*/));
|
imageStore(out_temporal_specular, pix, vec4(specular, 0./*unused*/));
|
||||||
|
#endif // ifndef DISABLE_TEMPORAL_DENOISER
|
||||||
colour = diffuse + specular;
|
colour = diffuse + specular;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue