Blur is now looking like real blur
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
#version 430
|
||||
|
||||
layout (binding = 0) uniform sampler2D Texture;
|
||||
|
||||
|
||||
in VertexData{
|
||||
vec2 TextureCoordinate;
|
||||
}Input;
|
||||
|
||||
out vec4 fragmentColor;
|
||||
|
||||
void main()
|
||||
{
|
||||
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);
|
||||
|
||||
fragmentColor = texel0 + texel1 + texel2 + texel3;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
#version 430
|
||||
|
||||
layout (location = 0) in vec3 Position;
|
||||
|
||||
out VertexData{
|
||||
vec2 TextureCoordinate;
|
||||
}Output;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = vec4(Position, 1.0);
|
||||
Output.TextureCoordinate = (vec2(Position) + 1) / 2;
|
||||
}
|
||||
Reference in New Issue
Block a user