From e9e54c0c6541d78609f44c9e0222424f3f1615b9 Mon Sep 17 00:00:00 2001 From: RDW Date: Wed, 13 Dec 2023 02:22:01 +0100 Subject: [PATCH] Update RagnarokGND.lua --- Core/FileFormats/RagnarokGND.lua | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/Core/FileFormats/RagnarokGND.lua b/Core/FileFormats/RagnarokGND.lua index 2df39e97..864a86aa 100644 --- a/Core/FileFormats/RagnarokGND.lua +++ b/Core/FileFormats/RagnarokGND.lua @@ -391,7 +391,9 @@ function RagnarokGND:GenerateGroundMeshSections() -- -- Copy from NORTH end - if not isOnMapBoundaryU then -- Copy from EAST (if possible) + -- Copy bottom right color if possible + -- Copy from EAST (if possible) + if not isOnMapBoundaryU then if adjacentCubeEast.top_surface_id == -1 then -- Can't copy :/ bottomRightVertexColor = bottomLeftVertexColor @@ -401,6 +403,23 @@ function RagnarokGND:GenerateGroundMeshSections() end end + -- Copy top left color if possible + if not isOnMapBoundaryV then + if adjacentCubeNorth.top_surface_id == -1 then + -- Can't copy :/ + topLeftVertexColor = bottomLeftVertexColor + else + local adjacentGroundSurfaceNorth = self.texturedSurfaces[adjacentCubeNorth.top_surface_id] + topLeftVertexColor = adjacentGroundSurfaceNorth.bottom_left_color + end + + end + + -- Copy top right color if possible + if not isOnMapBoundaryU then + + end + table_insert(mesh.vertexColors, bottomLeftVertexColor.red / 255) table_insert(mesh.vertexColors, bottomLeftVertexColor.green / 255) table_insert(mesh.vertexColors, bottomLeftVertexColor.blue / 255)