Sprites now have a distance lighting calculation that's the same as the raycaster using a shader.
This commit is contained in:
parent
a19bc47904
commit
3986e6978e
4 changed files with 21 additions and 8 deletions
|
@ -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();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue