if (renderState == 0) {\r
FragColor = texture(shadowmapTexture, TexCoords);\r
}\r
- // stencil buffer\r
else if (renderState == 1) {\r
FragColor = texture(irradianceTexture, TexCoords);\r
}\r
else if (renderState == 2) {\r
- FragColor = texture(shadowmapTexture, TexCoords) * texture(irradianceTexture, TexCoords);\r
- }\r
- else if (renderState == 3) {\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
+ // * texture(shadowmapTexture, sampleCoords);\r
+ vec4 sample = texture(irradianceTexture, sampleCoords);\r
vec4 weight = vec4(sampleWeights[i], 1);\r
result += sample * weight;\r
}\r