the
This commit is contained in:
parent
aae55b36e6
commit
e54abe1f33
40 changed files with 1327 additions and 20 deletions
14
pixel_art.gdshader
Normal file
14
pixel_art.gdshader
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
shader_type canvas_item;
|
||||
render_mode skip_vertex_transform, unshaded;
|
||||
|
||||
const vec2 target_resolution = vec2(320.0, 180.0);
|
||||
const float colors_per_channel = 16.0;
|
||||
|
||||
uniform sampler2D screen_texture: hint_screen_texture, filter_nearest;
|
||||
|
||||
void fragment() {
|
||||
vec2 uv = floor(SCREEN_UV * target_resolution) / target_resolution;
|
||||
vec3 color = texture(screen_texture, uv).rgb;
|
||||
vec3 quantized_color = floor(color * colors_per_channel) / colors_per_channel;
|
||||
COLOR = vec4(quantized_color, 1.0);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue