Bloom bad edge clamp fixed

This commit is contained in:
Tleety
2016-03-10 13:42:33 +01:00
parent c3255519bf
commit 329a15e08b
4 changed files with 28 additions and 18 deletions
@@ -1,6 +1,7 @@
#version 430
layout (binding = 0) uniform sampler2D Texture;
uniform int MaxMipMap;
in VertexData{
@@ -11,12 +12,19 @@ out vec4 fragmentColor;
void main()
{
vec4 result = vec4(0.0, 0.0, 0.0, 0.0);
for(int i = 0; i < MaxMipMap; i++) {
result += textureLod(Texture, Input.TextureCoordinate, i);
}
fragmentColor = result;
/*
vec4 texel0 = textureLod(Texture, Input.TextureCoordinate, 0);
vec4 texel1 = textureLod(Texture, Input.TextureCoordinate, 1);
vec4 texel2 = textureLod(Texture, Input.TextureCoordinate, 2);
vec4 texel3 = textureLod(Texture, Input.TextureCoordinate, 3);
vec4 texel4 = textureLod(Texture, Input.TextureCoordinate, 4);
fragmentColor = texel0 + texel1 + texel2 + texel3;
fragmentColor = texel0 + texel1 + texel2 + texel3 + texel4;*/
}