WIP fake raytracer output
This commit is contained in:
parent
4e57deaf33
commit
ef031c2073
4 changed files with 32 additions and 4 deletions
|
|
@ -481,8 +481,8 @@ void VulkanRenderDevice::InitLightmap(int LMTextureSize, int LMTextureCount, TAr
|
|||
{
|
||||
Printf("Running VkLightmap.\n");
|
||||
|
||||
VkLightmap lightmap(this);
|
||||
lightmap.Raytrace(&mesh);
|
||||
//VkLightmap lightmap(this);
|
||||
//lightmap.Raytrace(&mesh);
|
||||
|
||||
Printf("Copying data.\n");
|
||||
|
||||
|
|
@ -490,6 +490,10 @@ void VulkanRenderDevice::InitLightmap(int LMTextureSize, int LMTextureCount, TAr
|
|||
|
||||
auto clamp = [](float a, float min, float max) -> float { return a < min ? min : a > max ? max : a; };
|
||||
|
||||
|
||||
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);
|
||||
|
||||
for (auto& surface : mesh.surfaces)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue