Trying to make sync work

This commit is contained in:
Nikolai Rodionov
2025-02-06 13:42:14 +01:00
committed by Nikolai Rodionov
parent 8f61ab6c6b
commit cc709975ba
80 changed files with 8991 additions and 260 deletions

View File

@ -0,0 +1,25 @@
@shader_type spatial;
@render_mode unshaded;
@uniform sampler2D albedo_texture;
@uniform vec3 light_color = vec3(1.0, 1.0, 1.0);
@uniform float outline_width = 0.05;
@uniform vec3 outline_color = vec3(0.0, 0.0, 0.0);
void fragment() {
// Fake directional light
vec3 light_dir = normalize(vec3(0.5, 1.0, -0.5));
vec3 norm = normalize(NORMAL);
float intensity = dot(norm, light_dir);
// Cel shading - Quantized lighting steps
float shade = step(0.1, intensity) * 0.3 +
step(0.3, intensity) * 0.4 +
step(0.6, intensity) * 0.3;
// Sample texture and apply shading
vec4 tex_color = texture(albedo_texture, UV);
vec3 final_color = tex_color.rgb * shade * light_color;
ALBEDO = final_color;
}