12 lines
445 B
Plaintext
12 lines
445 B
Plaintext
shader_type canvas_item;
|
|
|
|
// Allows you to sample the pixels rendered behind this node
|
|
uniform sampler2D screen_texture : hint_screen_texture, filter_linear_mipmap;
|
|
|
|
uniform float lod : hint_range(0.0, 5.0) = 2.0;
|
|
uniform vec4 color_tint : source_color = vec4(1.0, 1.0, 1.0, 0.1);
|
|
|
|
void fragment() {
|
|
vec4 blurred_screen = textureLod(screen_texture, SCREEN_UV, lod);
|
|
COLOR = mix(blurred_screen, vec4(color_tint.rgb, 1.0), color_tint.a);
|
|
} |