mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 19:41:51 +00:00
optimize Skybox
This commit is contained in:
parent
1717b74042
commit
22cb3acd11
2 changed files with 37 additions and 17 deletions
|
|
@ -12,6 +12,8 @@ class Shader;
|
|||
class Assets;
|
||||
class Camera;
|
||||
class Batch3D;
|
||||
class Shader;
|
||||
class Cubemap;
|
||||
class Framebuffer;
|
||||
class DrawContext;
|
||||
|
||||
|
|
@ -33,11 +35,16 @@ class Skybox {
|
|||
std::unique_ptr<Mesh> mesh;
|
||||
std::unique_ptr<Batch3D> batch3d;
|
||||
std::vector<skysprite> sprites;
|
||||
int frameid = 0;
|
||||
|
||||
float prevMie = -1.0f;
|
||||
float prevT = -1.0f;
|
||||
|
||||
void drawStars(float angle, float opacity);
|
||||
void drawBackground(
|
||||
const Camera& camera, const Assets& assets, int width, int height
|
||||
);
|
||||
void refreshFace(uint face, Cubemap* cubemap);
|
||||
public:
|
||||
Skybox(uint size, Shader* shader);
|
||||
~Skybox();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue