mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Fix world-aligned node rendering at bottom (#10742)
This commit is contained in:
parent
b2ab5fd161
commit
e441ab9675
1 changed files with 3 additions and 3 deletions
|
@ -404,7 +404,7 @@ static void getNodeVertexDirs(const v3s16 &dir, v3s16 *vertex_dirs)
|
||||||
|
|
||||||
static void getNodeTextureCoords(v3f base, const v3f &scale, const v3s16 &dir, float *u, float *v)
|
static void getNodeTextureCoords(v3f base, const v3f &scale, const v3s16 &dir, float *u, float *v)
|
||||||
{
|
{
|
||||||
if (dir.X > 0 || dir.Y > 0 || dir.Z < 0)
|
if (dir.X > 0 || dir.Y != 0 || dir.Z < 0)
|
||||||
base -= scale;
|
base -= scale;
|
||||||
if (dir == v3s16(0,0,1)) {
|
if (dir == v3s16(0,0,1)) {
|
||||||
*u = -base.X - 1;
|
*u = -base.X - 1;
|
||||||
|
@ -422,8 +422,8 @@ static void getNodeTextureCoords(v3f base, const v3f &scale, const v3s16 &dir, f
|
||||||
*u = base.X + 1;
|
*u = base.X + 1;
|
||||||
*v = -base.Z - 2;
|
*v = -base.Z - 2;
|
||||||
} else if (dir == v3s16(0,-1,0)) {
|
} else if (dir == v3s16(0,-1,0)) {
|
||||||
*u = base.X;
|
*u = base.X + 1;
|
||||||
*v = base.Z;
|
*v = base.Z + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue