Compare commits
3 Commits
b747dcfb21
...
82fe146549
Author | SHA1 | Date |
---|---|---|
Cat Flynn | 82fe146549 | |
Cat Flynn | 6ca53a5329 | |
Cat Flynn | 892bec867c |
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue