]> gitweb.ps.run Git - subsurface_scattering/blobdiff - shaders/fbo_frag.glsl
remove debugging renderstate
[subsurface_scattering] / shaders / fbo_frag.glsl
index f92483e3b55227d27f277a63edf9770e69e8d605..8ffc0ce64cd5565fc5d4911cecaa7f55e5e76416 100644 (file)
@@ -13,24 +13,16 @@ uniform vec3 sampleWeights[13];
 \r
 void main()\r
 {\r
-    if (renderState == 0) {\r
-        FragColor = texture(shadowmapTexture, TexCoords);\r
-    }\r
-    else if (renderState == 1) {\r
-        FragColor = texture(irradianceTexture, TexCoords);\r
-    }\r
-    else if (renderState == 2) {\r
-        // sample calculated irradiance\r
-        // using Gaussian kernel to approximate light spread\r
-        vec4 result = vec4(0, 0, 0, 1);\r
-        for (int i = 0; i < 13; i++) {\r
-            vec2 sampleCoords = TexCoords + samplePositions[i] * vec2(1.0/screenWidth, 1.0/screenHeight);\r
-            //vec4 sample = texture(irradianceTexture, sampleCoords)\r
-            //            * texture(shadowmapTexture, sampleCoords);\r
-            vec4 sample = texture(irradianceTexture, sampleCoords);\r
-            vec4 weight = vec4(sampleWeights[i], 1);\r
-            result += sample * weight;\r
-        }\r
-        FragColor = result;\r
+    // sample calculated irradiance\r
+    // using Gaussian kernel to approximate light spread\r
+    vec4 result = vec4(0, 0, 0, 1);\r
+    for (int i = 0; i < 13; i++) {\r
+        vec2 sampleCoords = TexCoords + samplePositions[i] * vec2(1.0/screenWidth, 1.0/screenHeight);\r
+        //vec4 sample = texture(irradianceTexture, sampleCoords)\r
+        //            * texture(shadowmapTexture, sampleCoords);\r
+        vec4 sample = texture(irradianceTexture, sampleCoords);\r
+        vec4 weight = vec4(sampleWeights[i], 1);\r
+        result += sample * weight;\r
     }\r
+    FragColor = result;\r
 }\r