From 67d227deed625ce1bdb9ca51d59d0a64133542dc Mon Sep 17 00:00:00 2001 From: ktyl Date: Wed, 1 Mar 2023 00:11:29 +0000 Subject: [PATCH] show noise --- shader/quad/shader.frag | 4 ++-- shader/root/rt.glsl | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/shader/quad/shader.frag b/shader/quad/shader.frag index 1643a3e..cab058d 100644 --- a/shader/quad/shader.frag +++ b/shader/quad/shader.frag @@ -53,6 +53,6 @@ void main() float kSigma = 7.0; float threshold = 0.3; - FragColor = denoise(ourTexture, TexCoord, sigma, kSigma, threshold); - //FragColor = texture(ourTexture, TexCoord); + //FragColor = denoise(ourTexture, TexCoord, sigma, kSigma, threshold); + FragColor = texture(ourTexture, TexCoord); } diff --git a/shader/root/rt.glsl b/shader/root/rt.glsl index 34de0c3..94b4974 100644 --- a/shader/root/rt.glsl +++ b/shader/root/rt.glsl @@ -108,6 +108,8 @@ void main() pixel.xyz = mix(pixel.xyz, vec3(1.0), depth); + pixel.xyz = texture(_noise, uv*.5-.5).xyz; + // output to a specific pixel in the image imageStore(img_output, ivec2(gl_GlobalInvocationID.xy), pixel); }