Various fixes and improvements for large worlds rendering

This commit is contained in:
Wojtek Figat
2022-06-28 20:26:01 +02:00
parent b1640515c4
commit 27d266546e
18 changed files with 80 additions and 70 deletions

View File

@@ -152,7 +152,8 @@ void ShadowsOfMordor::Builder::onJobRender(GPUContext* context)
auto chunkSize = terrain->GetChunkSize();
const auto heightmap = patch->Heightmap.Get()->GetTexture();
const Matrix& world = chunk->GetWorld();
Matrix world;
chunk->GetTransform().GetWorld(world);
Matrix::Transpose(world, shaderData.WorldMatrix);
shaderData.LightmapArea = chunk->Lightmap.UVsArea;
shaderData.TerrainChunkSizeLOD0 = TERRAIN_UNITS_PER_VERTEX * chunkSize;