First step towards refactoring
This commit is contained in:
parent
ef031c2073
commit
6fc7eaf2fa
4 changed files with 34 additions and 28 deletions
|
|
@ -62,7 +62,7 @@ public:
|
|||
// Surface geometry
|
||||
SurfaceType type = ST_UNKNOWN;
|
||||
TArray<FVector3> verts;
|
||||
TArray<FVector3> uvs;
|
||||
TArray<FVector2> uvs;
|
||||
//Plane plane;
|
||||
FVector3 boundsMin, boundsMax;
|
||||
|
||||
|
|
@ -165,6 +165,20 @@ struct Portal
|
|||
class LevelMesh
|
||||
{
|
||||
public:
|
||||
LevelMesh()
|
||||
{
|
||||
// Default portal
|
||||
PortalInfo portalInfo;
|
||||
hwrenderer::Portal portal;
|
||||
|
||||
for (int i = 0; i < 16; ++i)
|
||||
{
|
||||
portalInfo.transformation[i] = (&portal.transformation[0][0])[i];
|
||||
}
|
||||
|
||||
this->portalInfo.Push(portalInfo);
|
||||
}
|
||||
|
||||
virtual ~LevelMesh() = default;
|
||||
|
||||
TArray<FVector3> MeshVertices;
|
||||
|
|
|
|||
|
|
@ -477,7 +477,7 @@ void VulkanRenderDevice::BeginFrame()
|
|||
|
||||
void VulkanRenderDevice::InitLightmap(int LMTextureSize, int LMTextureCount, TArray<uint16_t>& LMTextureData, hwrenderer::LevelMesh& mesh)
|
||||
{
|
||||
if(mesh.surfaces.size() > 0)
|
||||
if(false && mesh.surfaces.size() > 0)
|
||||
{
|
||||
Printf("Running VkLightmap.\n");
|
||||
|
||||
|
|
@ -494,7 +494,7 @@ void VulkanRenderDevice::InitLightmap(int LMTextureSize, int LMTextureCount, TAr
|
|||
std::sort(mesh.surfaces.begin(), mesh.surfaces.end(), [](const std::unique_ptr<hwrenderer::Surface>& a, const std::unique_ptr<hwrenderer::Surface>& b) { return a->texHeight != b->texHeight ? a->texHeight > b->texHeight : a->texWidth > b->texWidth; });
|
||||
|
||||
|
||||
RectPacker packer(LMTextureSize, LMTextureSize);
|
||||
RectPacker packer(LMTextureSize, LMTextureSize, RectPacker::Spacing(0));
|
||||
|
||||
for (auto& surface : mesh.surfaces)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue