treesummaryrefslogcommitdiff
path: root/shaders/fbo_frag.glsl
diff options
context:
space:
mode:
authorPatrick2021-03-26 20:13:19 +0100
committerPatrick2021-03-26 20:13:19 +0100
commit54a47a42ce3f6f05eafd62305552ee48dc08913f (patch)
tree6dba95d1071357d3e36a9be892ce44d83f722e3f /shaders/fbo_frag.glsl
parent0a5e8172a6ee0e79c81eec21a9966bea9385b249 (diff)
downloadsubsurface_scattering-54a47a42ce3f6f05eafd62305552ee48dc08913f.tar.gz
subsurface_scattering-54a47a42ce3f6f05eafd62305552ee48dc08913f.zip
remove debugging renderstate
Diffstat (limited to 'shaders/fbo_frag.glsl')
-rw-r--r--shaders/fbo_frag.glsl30
1 files changed, 11 insertions, 19 deletions
diff --git a/shaders/fbo_frag.glsl b/shaders/fbo_frag.glsl
index f92483e..8ffc0ce 100644
--- a/shaders/fbo_frag.glsl
+++ b/shaders/fbo_frag.glsl
@@ -13,24 +13,16 @@ uniform vec3 sampleWeights[13];
void main()
{
- if (renderState == 0) {
- FragColor = texture(shadowmapTexture, TexCoords);
- }
- else if (renderState == 1) {
- FragColor = texture(irradianceTexture, TexCoords);
- }
- else if (renderState == 2) {
- // sample calculated irradiance
- // using Gaussian kernel to approximate light spread
- vec4 result = vec4(0, 0, 0, 1);
- for (int i = 0; i < 13; i++) {
- vec2 sampleCoords = TexCoords + samplePositions[i] * vec2(1.0/screenWidth, 1.0/screenHeight);
- //vec4 sample = texture(irradianceTexture, sampleCoords)
- // * texture(shadowmapTexture, sampleCoords);
- vec4 sample = texture(irradianceTexture, sampleCoords);
- vec4 weight = vec4(sampleWeights[i], 1);
- result += sample * weight;
- }
- FragColor = result;
+ // sample calculated irradiance
+ // using Gaussian kernel to approximate light spread
+ vec4 result = vec4(0, 0, 0, 1);
+ for (int i = 0; i < 13; i++) {
+ vec2 sampleCoords = TexCoords + samplePositions[i] * vec2(1.0/screenWidth, 1.0/screenHeight);
+ //vec4 sample = texture(irradianceTexture, sampleCoords)
+ // * texture(shadowmapTexture, sampleCoords);
+ vec4 sample = texture(irradianceTexture, sampleCoords);
+ vec4 weight = vec4(sampleWeights[i], 1);
+ result += sample * weight;
}
+ FragColor = result;
}