Compare commits

...

3 Commits

Author SHA1 Message Date
Cat Flynn 82fe146549 update window dimensions 2023-02-26 03:30:07 +00:00
Cat Flynn 6ca53a5329 apply gamma correction 2023-02-26 03:30:07 +00:00
Cat Flynn 892bec867c tune denoise 2023-02-26 03:30:03 +00:00
3 changed files with 12 additions and 5 deletions

View File

@ -49,9 +49,9 @@ vec4 denoise(sampler2D tex, vec2 uv, float sigma, float kSigma, float threshold)
void main()
{
float sigma = 2.2;
float kSigma = 10.0;
float threshold = 0.2;
float sigma = 2.5;
float kSigma = 7.0;
float threshold = 0.3;
FragColor = denoise(ourTexture, TexCoord, sigma, kSigma, threshold);
//FragColor = texture(ourTexture, TexCoord);

View File

@ -99,6 +99,13 @@ void main()
depth += sampleDepth / float(samples);
}
// include the first sample we took
samples++;
// gamma correction
float scale = 1.0 / samples;
pixel.xyz = sqrt(scale * pixel.xyz);
pixel.xyz = mix(pixel.xyz, vec3(1.0), depth);
// output to a specific pixel in the image

View File

@ -7,8 +7,8 @@
#include "cam.h"
#include "input.h"
const int WIDTH = 420;
const int HEIGHT = 420;
const int WIDTH = 500;
const int HEIGHT = 500;
void updateUniforms(GLuint shaderProgram, float t);