Untitled
Toggle main menu visibility
Loading...
Searching...
No Matches
bloom_upscale.frag
Go to the documentation of this file.
1
#version 460 core
2
3
uniform sampler2D
srcTexture
;
4
uniform
float
uFilterRadius
;
5
6
in
vec2
vUV
;
7
out
vec4
fragColor
;
8
9
void
main
() {
10
11
float
x =
uFilterRadius
;
12
float
y =
uFilterRadius
;
13
14
vec3
a = texture(
srcTexture
,
vec2
(
vUV
.
x
- x,
vUV
.
y
+ y)).rgb;
15
vec3
b = texture(
srcTexture
,
vec2
(
vUV
.
x
,
vUV
.
y
+ y)).rgb;
16
vec3
c = texture(
srcTexture
,
vec2
(
vUV
.
x
+ x,
vUV
.
y
+ y)).rgb;
17
18
vec3
d = texture(
srcTexture
,
vec2
(
vUV
.
x
- x,
vUV
.
y
)).rgb;
19
vec3
e = texture(
srcTexture
,
vec2
(
vUV
.
x
,
vUV
.
y
)).rgb;
20
vec3
f = texture(
srcTexture
,
vec2
(
vUV
.
x
+ x,
vUV
.
y
)).rgb;
21
22
vec3
g = texture(
srcTexture
,
vec2
(
vUV
.
x
- x,
vUV
.
y
- y)).rgb;
23
vec3
h = texture(
srcTexture
,
vec2
(
vUV
.
x
,
vUV
.
y
- y)).rgb;
24
vec3
i = texture(
srcTexture
,
vec2
(
vUV
.
x
+ x,
vUV
.
y
- y)).rgb;
25
26
vec3
upsample = e * 4.0;
27
upsample += (b + d + f + h) * 2.0;
28
upsample += (a + c + g + i);
29
upsample *= 1.0 / 16.0;
30
31
fragColor
=
vec4
(upsample, 1.0);
32
33
}
main
void main()
Definition
audio_probe_bake.comp:465
fragColor
out vec4 fragColor
Definition
bloom.frag:6
srcTexture
uniform sampler2D srcTexture
Definition
bloom_downscale.frag:3
uFilterRadius
uniform float uFilterRadius
Definition
bloom_upscale.frag:4
vUV
in vec2 vUV
Definition
lightmap.frag:13
vec2::x
float x
Definition
types.h:11
vec2::y
float y
Definition
types.h:11
vec2
Definition
types.h:11
vec3
Definition
types.h:12
vec4
Definition
types.h:13
src
render
bloom_upscale.frag
Generated by
1.18.0