mirror of
https://github.com/Relintai/voxelman.git
synced 2025-02-14 16:40:06 +01:00
Don't bake colors, if lighting is disabled.
This commit is contained in:
parent
b9ba0c0bf9
commit
81dc8bcb36
@ -40,6 +40,9 @@ _FORCE_INLINE_ void VoxelMesherDefault::set_build_flags(const int flags) {
|
||||
void VoxelMesherDefault::_bake_colors(Ref<VoxelChunk> chunk) {
|
||||
ERR_FAIL_COND(!chunk.is_valid());
|
||||
|
||||
if ((get_build_flags() & VoxelChunkDefault::BUILD_FLAG_USE_LIGHTING) == 0)
|
||||
return;
|
||||
|
||||
if (_vertices.size() == 0)
|
||||
return;
|
||||
|
||||
@ -96,6 +99,9 @@ void VoxelMesherDefault::_bake_colors(Ref<VoxelChunk> chunk) {
|
||||
void VoxelMesherDefault::_bake_liquid_colors(Ref<VoxelChunk> chunk) {
|
||||
ERR_FAIL_COND(!chunk.is_valid());
|
||||
|
||||
if ((get_build_flags() & VoxelChunkDefault::BUILD_FLAG_USE_LIGHTING) == 0)
|
||||
return;
|
||||
|
||||
if (_vertices.size() == 0)
|
||||
return;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user