mirror of
https://github.com/Relintai/pandemonium_demo_projects.git
synced 2024-12-23 14:06:50 +01:00
11 lines
316 B
Plaintext
11 lines
316 B
Plaintext
|
shader_type canvas_item;
|
||
|
|
||
|
uniform sampler2D vignette;
|
||
|
|
||
|
void fragment() {
|
||
|
vec3 vignette_color = texture(vignette, UV).rgb;
|
||
|
// Screen texture stores gaussian blurred copies on mipmaps.
|
||
|
COLOR.rgb = textureLod(SCREEN_TEXTURE, SCREEN_UV, (1.0 - vignette_color.r) * 4.0).rgb;
|
||
|
COLOR.rgb *= texture(vignette, UV).rgb;
|
||
|
}
|