Files
MovementTests/scenes/player_controller/shaders/Blur.gdshader
Minimata cd519e528f
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 55s
Create tag and build when new code gets to main / Test (push) Successful in 7m7s
Create tag and build when new code gets to main / Export (push) Successful in 9m56s
complete project reorganization
2026-02-04 11:20:00 +01:00

24 lines
634 B
Plaintext

// Original by ChaffDave : https://godotshaders.com/shader/tilt-shift-shader/
shader_type canvas_item;
uniform float limit: hint_range(0.0,0.5) = 0.2;
uniform float blur: hint_range(0.0,8.0) = 2.0;
uniform sampler2D screen_texture : hint_screen_texture, filter_linear_mipmap;
void fragment(){
if (UV.y<limit){
float blur_amount = blur * (1.0 - (SCREEN_UV.y / limit));
COLOR = textureLod(screen_texture, SCREEN_UV, blur_amount);
} else if (UV.y > 1.0-limit){
float blur_amount = blur * (1.0 - ((1.0 - SCREEN_UV.y) / limit));
COLOR = textureLod(screen_texture, SCREEN_UV, blur_amount);
} else {
COLOR.a = 0.0;
}
}