mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add gfx.blockwraps.set_tints
This commit is contained in:
parent
e423c74628
commit
c47432c979
5 changed files with 54 additions and 22 deletions
|
|
@ -68,6 +68,7 @@ void BlockWrapsRenderer::draw(BlockWrapper& wrapper, const Texture* texture) {
|
|||
glm::vec3(1.01f),
|
||||
wrapper.uvRegions,
|
||||
light,
|
||||
wrapper.tints.data(),
|
||||
wrapper.emission,
|
||||
cullingBits
|
||||
);
|
||||
|
|
@ -82,6 +83,7 @@ void BlockWrapsRenderer::draw(BlockWrapper& wrapper, const Texture* texture) {
|
|||
size * glm::vec3(1.01f),
|
||||
wrapper.uvRegions,
|
||||
light,
|
||||
wrapper.tints.data(),
|
||||
wrapper.emission,
|
||||
cullingBits
|
||||
);
|
||||
|
|
@ -152,12 +154,16 @@ void BlockWrapsRenderer::draw(const DrawContext& pctx, const Player& player) {
|
|||
}
|
||||
|
||||
u64id_t BlockWrapsRenderer::add(
|
||||
const glm::ivec3& position, const std::string& texture, float emission
|
||||
const glm::ivec3& position,
|
||||
const std::string& texture,
|
||||
const glm::vec3& tint,
|
||||
float emission
|
||||
) {
|
||||
u64id_t id = nextWrapper++;
|
||||
wrappers[id] = std::make_unique<BlockWrapper>(BlockWrapper {
|
||||
position,
|
||||
{texture, texture, texture, texture, texture, texture},
|
||||
{tint, tint, tint, tint, tint, tint},
|
||||
emission});
|
||||
return id;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue