Sprites now have a distance lighting calculation that's the same as the raycaster using a shader.

This commit is contained in:
Zed A. Shaw 2025-02-07 13:50:50 -05:00
parent a19bc47904
commit 3986e6978e
4 changed files with 21 additions and 8 deletions

View file

@ -13,7 +13,7 @@ using RGBA = uint32_t;
struct Raycaster {
int $pitch=0;
sf::Clock $clock;
sf::Shader $brightness;
TexturePack &$textures;
double $posX = 0;
double $posY = 0;
@ -56,4 +56,5 @@ struct Raycaster {
}
void set_level(GameLevel level);
void init_shaders();
};