From a11152320f7607f7a7f662ed994d9e7af2b4e9ce Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Sun, 3 Sep 2023 05:24:23 +0200 Subject: [PATCH] Remove some unused code --- src/rendering/hwrenderer/doom_levelmesh.cpp | 28 --------------------- 1 file changed, 28 deletions(-) diff --git a/src/rendering/hwrenderer/doom_levelmesh.cpp b/src/rendering/hwrenderer/doom_levelmesh.cpp index 81c5f78fba..9e95310b37 100644 --- a/src/rendering/hwrenderer/doom_levelmesh.cpp +++ b/src/rendering/hwrenderer/doom_levelmesh.cpp @@ -4,11 +4,8 @@ #include "g_levellocals.h" #include "texturemanager.h" #include "playsim/p_lnspec.h" - - #include "c_dispatch.h" #include "g_levellocals.h" - #include "common/rendering/vulkan/accelstructs/vk_lightmap.h" #include @@ -683,31 +680,6 @@ void DoomLevelMesh::FinishSurface(int lightmapTextureWidth, int lightmapTextureH surface.atlasX = x; surface.atlasY = y; - -#if 0 - while (result.pageIndex >= textures.size()) - { - textures.push_back(std::make_unique(textureWidth, textureHeight)); - } - - uint16_t* currentTexture = textures[surface->atlasPageIndex]->Pixels(); - - FVector3* colorSamples = surface->texPixels.data(); - // store results to lightmap texture - for (int i = 0; i < sampleHeight; i++) - { - for (int j = 0; j < sampleWidth; j++) - { - // get texture offset - int offs = ((textureWidth * (i + surface->atlasY)) + surface->atlasX) * 3; - - // convert RGB to bytes - currentTexture[offs + j * 3 + 0] = floatToHalf(clamp(colorSamples[i * sampleWidth + j].x, 0.0f, 65000.0f)); - currentTexture[offs + j * 3 + 1] = floatToHalf(clamp(colorSamples[i * sampleWidth + j].y, 0.0f, 65000.0f)); - currentTexture[offs + j * 3 + 2] = floatToHalf(clamp(colorSamples[i * sampleWidth + j].z, 0.0f, 65000.0f)); - } - } -#endif } BBox DoomLevelMesh::GetBoundsFromSurface(const LevelMeshSurface& surface) const