mirror of
https://github.com/Relintai/voxelman.git
synced 2025-03-12 18:18:50 +01:00
Now the built in bake_colors method will keep the original alpha in colors if set. Also Added uv2 support in build_mesh.
This commit is contained in:
parent
3a8310c51f
commit
201ea0ce1f
@ -109,6 +109,10 @@ void VoxelMesher::build_mesh(RID mesh) {
|
||||
_surface_tool->add_uv(_uvs.get(i));
|
||||
}
|
||||
|
||||
if (_uv2s.size() > 0) {
|
||||
_surface_tool->add_uv2(_uv2s.get(i));
|
||||
}
|
||||
|
||||
_surface_tool->add_vertex(_vertices.get(i));
|
||||
}
|
||||
|
||||
@ -354,6 +358,9 @@ void VoxelMesher::_bake_colors(Node *p_chunk) {
|
||||
if (_colors.size() < _vertices.size()) {
|
||||
_colors.push_back(light);
|
||||
} else {
|
||||
Color c = _colors[i];
|
||||
|
||||
light.a = c.a;
|
||||
_colors.set(i, light);
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user