mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-25 21:41:03 +00:00
Remove LightmapOrigin, LightmapStepX and LightmapStepY as we no longer use them
This commit is contained in:
parent
4b12a67ce7
commit
6d1f5e02f5
6 changed files with 10 additions and 43 deletions
|
@ -68,11 +68,6 @@ struct LevelMeshSurface
|
|||
BBox bounds;
|
||||
uint16_t sampleDimension = 0;
|
||||
|
||||
// Lightmap world coordinates for the texture
|
||||
FVector3 worldOrigin = { 0.f, 0.f, 0.f };
|
||||
FVector3 worldStepX = { 0.f, 0.f, 0.f };
|
||||
FVector3 worldStepY = { 0.f, 0.f, 0.f };
|
||||
|
||||
// Calculate world coordinates to UV coordinates
|
||||
FVector3 translateWorldToLocal = { 0.f, 0.f, 0.f };
|
||||
FVector3 projLocalToU = { 0.f, 0.f, 0.f };
|
||||
|
|
|
@ -201,9 +201,6 @@ void VkLightmap::RenderBakeImage()
|
|||
pc.TileY = (float)selectedSurface.Y;
|
||||
pc.SurfaceIndex = mesh->GetSurfaceIndex(targetSurface);
|
||||
pc.TextureSize = (float)bakeImageSize;
|
||||
pc.LightmapOrigin = targetSurface->worldOrigin - targetSurface->worldStepX - targetSurface->worldStepY;
|
||||
pc.LightmapStepX = targetSurface->worldStepX * viewport.width;
|
||||
pc.LightmapStepY = targetSurface->worldStepY * viewport.height;
|
||||
pc.TileWidth = (float)targetSurface->texWidth;
|
||||
pc.TileHeight = (float)targetSurface->texHeight;
|
||||
pc.WorldToLocal = targetSurface->translateWorldToLocal;
|
||||
|
|
|
@ -23,18 +23,12 @@ struct LightmapPushConstants
|
|||
uint32_t LightEnd;
|
||||
int32_t SurfaceIndex;
|
||||
int32_t PushPadding1;
|
||||
FVector3 LightmapOrigin;
|
||||
float TextureSize;
|
||||
FVector3 LightmapStepX;
|
||||
float PushPadding3;
|
||||
FVector3 LightmapStepY;
|
||||
float PushPadding4;
|
||||
FVector3 WorldToLocal;
|
||||
float PushPadding5;
|
||||
float TextureSize;
|
||||
FVector3 ProjLocalToU;
|
||||
float PushPadding6;
|
||||
float PushPadding2;
|
||||
FVector3 ProjLocalToV;
|
||||
float PushPadding7;
|
||||
float PushPadding3;
|
||||
float TileX;
|
||||
float TileY;
|
||||
float TileWidth;
|
||||
|
|
|
@ -1194,7 +1194,6 @@ void DoomLevelMesh::BuildSurfaceParams(int lightMapTextureWidth, int lightMapTex
|
|||
{
|
||||
BBox bounds;
|
||||
FVector3 roundedSize;
|
||||
FVector3 tOrigin;
|
||||
int width;
|
||||
int height;
|
||||
float d;
|
||||
|
@ -1287,11 +1286,8 @@ void DoomLevelMesh::BuildSurfaceParams(int lightMapTextureWidth, int lightMapTex
|
|||
}
|
||||
|
||||
|
||||
tOrigin = bounds.min;
|
||||
|
||||
// project tOrigin and tCoords so they lie on the plane
|
||||
// project tCoords so they lie on the plane
|
||||
d = ((bounds.min | FVector3(plane.X, plane.Y, plane.Z)) - plane.W) / plane[axis]; //d = (plane->PointToDist(bounds.min)) / plane->Normal()[axis];
|
||||
tOrigin[axis] -= d;
|
||||
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
|
@ -1302,7 +1298,4 @@ void DoomLevelMesh::BuildSurfaceParams(int lightMapTextureWidth, int lightMapTex
|
|||
|
||||
surface.texWidth = width;
|
||||
surface.texHeight = height;
|
||||
surface.worldOrigin = tOrigin;
|
||||
surface.worldStepX = tCoords[0] * (float)surface.sampleDimension;
|
||||
surface.worldStepY = tCoords[1] * (float)surface.sampleDimension;
|
||||
}
|
||||
|
|
|
@ -74,18 +74,12 @@ layout(push_constant) uniform PushConstants
|
|||
uint LightEnd;
|
||||
int SurfaceIndex;
|
||||
int PushPadding1;
|
||||
vec3 LightmapOrigin;
|
||||
float TextureSize;
|
||||
vec3 LightmapStepX;
|
||||
float PushPadding3;
|
||||
vec3 LightmapStepY;
|
||||
float PushPadding4;
|
||||
vec3 WorldToLocal;
|
||||
float PushPadding5;
|
||||
float TextureSize;
|
||||
vec3 ProjLocalToU;
|
||||
float PushPadding6;
|
||||
float PushPadding2;
|
||||
vec3 ProjLocalToV;
|
||||
float PushPadding7;
|
||||
float PushPadding3;
|
||||
float TileX;
|
||||
float TileY;
|
||||
float TileWidth;
|
||||
|
|
|
@ -5,18 +5,12 @@ layout(push_constant) uniform PushConstants
|
|||
uint LightEnd;
|
||||
int SurfaceIndex;
|
||||
int PushPadding1;
|
||||
vec3 LightmapOrigin;
|
||||
float TextureSize;
|
||||
vec3 LightmapStepX;
|
||||
float PushPadding3;
|
||||
vec3 LightmapStepY;
|
||||
float PushPadding4;
|
||||
vec3 WorldToLocal;
|
||||
float PushPadding5;
|
||||
float TextureSize;
|
||||
vec3 ProjLocalToU;
|
||||
float PushPadding6;
|
||||
float PushPadding2;
|
||||
vec3 ProjLocalToV;
|
||||
float PushPadding7;
|
||||
float PushPadding3;
|
||||
float TileX;
|
||||
float TileY;
|
||||
float TileWidth;
|
||||
|
|
Loading…
Reference in a new issue