fix sun and shadows position synchronization

This commit is contained in:
MihailRis
2025-06-15 03:35:40 +03:00
parent 3e66ff5924
commit 1b84b7df5e
5 changed files with 35 additions and 18 deletions
+3 -2
View File
@@ -25,11 +25,12 @@ struct SkyboxVertex {
{{}, 0}};
};
struct skysprite {
struct SkySprite {
std::string texture;
float phase;
float distance;
bool emissive;
float altitude;
};
class Skybox {
@@ -42,7 +43,7 @@ class Skybox {
std::unique_ptr<Mesh<SkyboxVertex>> mesh;
std::unique_ptr<Batch3D> batch3d;
std::vector<skysprite> sprites;
std::vector<SkySprite> sprites;
int frameid = 0;
float prevMie = -1.0f;