système de sauvegarde, scène 3D de test sur la base astra et passage en forward+
This commit is contained in:
19
common/vfx/materials/shaders/pixelisation.gdshader
Normal file
19
common/vfx/materials/shaders/pixelisation.gdshader
Normal file
@@ -0,0 +1,19 @@
|
||||
shader_type spatial;
|
||||
|
||||
render_mode unshaded, fog_disabled;
|
||||
|
||||
uniform sampler2D screen_texture : hint_screen_texture;
|
||||
uniform float pixel_size : hint_range(0.0, 100., 2.0) = 8.0;
|
||||
|
||||
void fragment() {
|
||||
vec2 tex_size = vec2(textureSize(screen_texture, 0));
|
||||
vec2 pixel_count = tex_size / pixel_size;
|
||||
vec2 pixelated_uv = floor(SCREEN_UV * pixel_count) / pixel_count;
|
||||
vec4 color = texture(screen_texture, pixelated_uv);
|
||||
ALBEDO = color.rgb;
|
||||
}
|
||||
|
||||
//void light() {
|
||||
// // Called for every pixel for every light affecting the material.
|
||||
// // Uncomment to replace the default light processing function with this one.
|
||||
//}
|
||||
Reference in New Issue
Block a user