Create wall surfaces directly from the HWWall output

This commit is contained in:
dpjudas 2023-10-27 23:18:44 +02:00 committed by Magnus Norddahl
commit 9ca058ccc9
7 changed files with 100 additions and 196 deletions

View file

@ -18,6 +18,7 @@ typedef dp::rect_pack::RectPacker<int> RectPacker;
class LevelSubmesh;
class FMaterial;
class FGameTexture;
class LevelMeshLight
{
@ -58,7 +59,7 @@ struct LevelMeshSurface
bool NeedsUpdate = true;
bool AlwaysUpdate = false;
FTextureID texture = FNullTextureID();
FGameTexture* texture = nullptr;
float alpha = 1.0;
int portalIndex = 0;

View file

@ -305,9 +305,9 @@ void VkRaytrace::UploadMeshes(bool dynamicOnly)
info.SamplingDistance = (float)surface->sampleDimension;
info.Sky = surface->bSky;
info.Alpha = surface->alpha;
if (surface->texture.isValid())
if (surface->texture)
{
auto mat = FMaterial::ValidateTexture(TexMan.GetGameTexture(surface->texture), 0);
auto mat = FMaterial::ValidateTexture(surface->texture, 0);
info.TextureIndex = fb->GetBindlessTextureIndex(mat, CLAMP_NONE, 0);
}
else