Untitled
Toggle main menu visibility
Loading...
Searching...
No Matches
bloom.frag
Go to the documentation of this file.
1
2
#version 430 core
3
uniform sampler2D
uScene
;
4
5
in
vec2
vUV
;
6
out
vec4
fragColor
;
7
8
void
main
() {
9
10
vec4
sc = texture(
uScene
,
vUV
);
11
float
brightness = max(max(sc.r, sc.g), sc.b);
12
float
threshold = 1.0;
13
float
knee = 0.2;
14
15
16
float
rq =
clamp
(brightness - threshold + knee, 0.0, 2.0 * knee);
17
rq = (rq * rq) / (4.0 * knee);
18
19
float
intensity = max(rq, brightness - threshold);
20
21
float
multiplier = intensity / max(brightness, 0.0001);
22
23
fragColor
=
vec4
(sc.rgb * multiplier, 1.0);
24
25
26
}
27
main
void main()
Definition
audio_probe_bake.comp:465
uScene
uniform sampler2D uScene
Definition
bloom.frag:3
fragColor
out vec4 fragColor
Definition
bloom.frag:6
vUV
in vec2 vUV
Definition
lightmap.frag:13
clamp
float clamp(float a, float b, float c)
Definition
mathf.h:379
vec2
Definition
types.h:11
vec4
Definition
types.h:13
src
render
bloom.frag
Generated by
1.18.0