Compare commits

..

2 Commits

Author SHA1 Message Date
a8726b06c3 refactor: update grass block texture 2026-04-14 22:55:50 +08:00
bc0d4bfcf6 fix: correct texture coordinates 2026-04-14 22:55:04 +08:00
7 changed files with 43 additions and 8 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 253 B

After

Width:  |  Height:  |  Size: 512 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 253 B

After

Width:  |  Height:  |  Size: 362 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 253 B

After

Width:  |  Height:  |  Size: 512 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 253 B

After

Width:  |  Height:  |  Size: 512 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 253 B

After

Width:  |  Height:  |  Size: 512 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 259 B

After

Width:  |  Height:  |  Size: 399 B

View File

@@ -57,14 +57,49 @@ constexpr float VERTICES_POS[6][6][3] = {
};
constexpr float TEX_COORDS[6][6][2] = {
0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f,
0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f,
0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f,
0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f,
0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f,
0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f,
};
// ===== front (z = +1) =====
0.0f, 1.0f, // bottom left
0.0f, 0.0f, // top left
1.0f, 0.0f, // top right
1.0f, 0.0f, // top right
1.0f, 1.0f, // bottom right
0.0f, 1.0f, // bottom left
// ===== right (x = +1) =====
0.0f, 1.0f, // bottom front
1.0f, 1.0f, // bottom back
1.0f, 0.0f, // top back
1.0f, 0.0f, // top back
0.0f, 0.0f, // top front
0.0f, 1.0f, // bottom front
// ===== back (z = -1) =====
1.0f, 1.0f, // bottom left
0.0f, 1.0f, // bottom right
0.0f, 0.0f, // top right
0.0f, 0.0f, // top right
1.0f, 0.0f, // top left
1.0f, 1.0f, // bottom left
// ===== left (x = -1) =====
1.0f, 1.0f, // bottom back
0.0f, 1.0f, // bottom front
0.0f, 0.0f, // top front
0.0f, 0.0f, // top front
1.0f, 0.0f, // top back
1.0f, 1.0f, // bottom back
// ===== top (y = +1) =====
0.0f, 0.0f, // back left
1.0f, 0.0f, // back right
1.0f, 1.0f, // front right
1.0f, 1.0f, // front right
0.0f, 1.0f, // front left
0.0f, 0.0f, // back left
// ===== bottom (y = -1) =====
0.0f, 0.0f, // front left
1.0f, 0.0f, // front right
1.0f, 1.0f, // back right
1.0f, 1.0f, // back right
0.0f, 1.0f, // back left
0.0f, 0.0f, // front left
};
constexpr float CUBE_VER[24] = {
0.0, 0.0, 0.0,