mirror of
https://github.com/Relintai/voxelman.git
synced 2024-11-12 10:15:12 +01:00
Now the Transvoxel mesher will only interpolate between uv1 and uv2 at 3 steps (0, 0.5, 1).
This commit is contained in:
parent
19f3c1f8ff
commit
c48dfde661
@ -282,8 +282,13 @@ void VoxelMesherUVTransvoxel::_add_chunk(Ref<VoxelChunk> p_chunk) {
|
||||
|
||||
float surface_ratio = 1.0;
|
||||
|
||||
if (type_id1 != type_id2)
|
||||
surface_ratio = static_cast<float>(type_id1c) / static_cast<float>(type_id2c) / 8.0;
|
||||
if (type_id1 != type_id2) {
|
||||
if (type_id1c > 0 && type_id2c > 0) {
|
||||
surface_ratio = 0.5;
|
||||
} else {
|
||||
surface_ratio = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Ref<VoxelSurface> surface1 = _library->get_voxel_surface(type_id1 - 1);
|
||||
Ref<VoxelSurface> surface2 = _library->get_voxel_surface(type_id2 - 1);
|
||||
|
Loading…
Reference in New Issue
Block a user