Untitled
Loading...
Searching...
No Matches
bloom_blur.frag
Go to the documentation of this file.
1
2#version 430 core
3
6
7uniform sampler2D uBloom;
8uniform vec2 uDirection;
9uniform vec2 uTexel;
10
11const float weights[5] = float[](0.227027f, 0.1945946f, 0.1216216f, 0.054054f, 0.016216f);
12void main() {
13 vec3 result = vec3(0.0);
14
15 for (int i = -4; i <= 4; ++i) {
16 vec2 uv = vUV + uDirection * uTexel * float(i);
17 result += texture(uBloom, uv).rgb * weights[abs(i)];
18 }
19
20 fragColor = vec4(result, 1.0);
21}
void main()
out vec4 fragColor
Definition bloom.frag:6
uniform vec2 uDirection
uniform sampler2D uBloom
const float weights[5]
uniform vec2 uTexel
in vec2 uv
in vec2 vUV
Definition lightmap.frag:13
Definition types.h:11
Definition types.h:12
Definition types.h:13