started working on a boss room.

This commit is contained in:
2026-01-21 19:44:48 +01:00
parent 152992398c
commit c153c69e37
32 changed files with 871 additions and 1 deletions

View File

@@ -0,0 +1,20 @@
shader_type canvas_item;
uniform sampler2D screen_texture : hint_screen_texture, filter_linear_mipmap;
uniform float brightness_multiplier : hint_range(1.0, 10.0) = 3.0;
void fragment() {
// 1. Get the color of the darkened floor behind the sprite
vec4 background = texture(screen_texture, SCREEN_UV);
// 2. Get the shape/fading of your light texture
// We use the 'r' channel or 'a' channel depending on your sprite
float mask = texture(TEXTURE, UV).a;
// 3. Instead of adding white, we multiply the background pixels
// This restores the original colors of your tiles
vec3 light_effect = background.rgb * (1.0 + (mask * brightness_multiplier));
// 4. Output the result
COLOR = vec4(light_effect, 1.0);
}

View File

@@ -0,0 +1 @@
uid://c40fb6mfe76g3