Don't use texture scale. In the blocky mesher.

This commit is contained in:
Relintai 2022-02-24 18:01:25 +01:00
parent c5afc68256
commit ea20c85900

View File

@ -154,10 +154,10 @@ void Terrain2DMesherBlocky::add_chunk_normal(Ref<Terrain2DChunkDefault> chunk) {
add_indices(vc + 0);
Vector2 uvs[] = {
surface->transform_uv_scaled(Vector2(1, 0), x % get_texture_scale(), y % get_texture_scale(), get_texture_scale()),
surface->transform_uv_scaled(Vector2(0, 0), x % get_texture_scale(), y % get_texture_scale(), get_texture_scale()),
surface->transform_uv_scaled(Vector2(0, 1), x % get_texture_scale(), y % get_texture_scale(), get_texture_scale()),
surface->transform_uv_scaled(Vector2(1, 1), x % get_texture_scale(), y % get_texture_scale(), get_texture_scale())
surface->transform_uv(Vector2(1, 0)),
surface->transform_uv(Vector2(0, 0)),
surface->transform_uv(Vector2(0, 1)),
surface->transform_uv(Vector2(1, 1))
};
int xx = (x + 1) * cell_size_x;