mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 19:41:51 +00:00
fix: backlight not applied to entities
This commit is contained in:
parent
bc24151a63
commit
45a1e1df82
3 changed files with 43 additions and 19 deletions
|
|
@ -12,6 +12,7 @@ class Mesh;
|
|||
class Texture;
|
||||
class Chunks;
|
||||
class Assets;
|
||||
struct EngineSettings;
|
||||
|
||||
namespace model {
|
||||
struct Mesh;
|
||||
|
|
@ -32,6 +33,7 @@ class ModelBatch {
|
|||
Chunks* chunks;
|
||||
Texture* texture = nullptr;
|
||||
UVRegion region {0.0f, 0.0f, 1.0f, 1.0f};
|
||||
const EngineSettings* settings;
|
||||
|
||||
static inline glm::vec3 SUN_VECTOR {0.411934f, 0.863868f, -0.279161f};
|
||||
|
||||
|
|
@ -65,7 +67,8 @@ class ModelBatch {
|
|||
const glm::mat4& matrix,
|
||||
const glm::mat3& rotation,
|
||||
glm::vec3 tint,
|
||||
const texture_names_map* varTextures);
|
||||
const texture_names_map* varTextures,
|
||||
bool backlight);
|
||||
void setTexture(const std::string& name,
|
||||
const texture_names_map* varTextures);
|
||||
void setTexture(Texture* texture);
|
||||
|
|
@ -80,7 +83,12 @@ class ModelBatch {
|
|||
};
|
||||
std::vector<DrawEntry> entries;
|
||||
public:
|
||||
ModelBatch(size_t capacity, Assets* assets, Chunks* chunks);
|
||||
ModelBatch(
|
||||
size_t capacity,
|
||||
Assets* assets,
|
||||
Chunks* chunks,
|
||||
const EngineSettings* settings
|
||||
);
|
||||
~ModelBatch();
|
||||
|
||||
void draw(glm::mat4 matrix,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue