mirror of
https://github.com/ZDoom/ZDRay.git
synced 2025-01-24 08:41:06 +00:00
Remove unused indirect samples buffer
This commit is contained in:
parent
44b1d90968
commit
443d447fcb
2 changed files with 0 additions and 14 deletions
|
@ -238,7 +238,6 @@ void LevelMesh::BuildSurfaceParams(Surface* surface)
|
||||||
surface->lightmapSteps[1] = tCoords[1] * (float)surface->sampleDimension;
|
surface->lightmapSteps[1] = tCoords[1] * (float)surface->sampleDimension;
|
||||||
|
|
||||||
surface->samples.resize(width * height);
|
surface->samples.resize(width * height);
|
||||||
surface->indirect.resize(width * height);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BBox LevelMesh::GetBoundsFromSurface(const Surface* surface)
|
BBox LevelMesh::GetBoundsFromSurface(const Surface* surface)
|
||||||
|
@ -290,18 +289,6 @@ void LevelMesh::FinishSurface(Surface* surface)
|
||||||
int sampleHeight = surface->lightmapDims[1];
|
int sampleHeight = surface->lightmapDims[1];
|
||||||
vec3* colorSamples = surface->samples.data();
|
vec3* colorSamples = surface->samples.data();
|
||||||
|
|
||||||
if (!surface->indirect.empty())
|
|
||||||
{
|
|
||||||
vec3* indirect = surface->indirect.data();
|
|
||||||
for (int i = 0; i < sampleHeight; i++)
|
|
||||||
{
|
|
||||||
for (int j = 0; j < sampleWidth; j++)
|
|
||||||
{
|
|
||||||
colorSamples[i * sampleWidth + j] += indirect[i * sampleWidth + j] * 0.5f;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// SVE redraws the scene for lightmaps, so for optimizations,
|
// SVE redraws the scene for lightmaps, so for optimizations,
|
||||||
// tell the engine to ignore this surface if completely black
|
// tell the engine to ignore this surface if completely black
|
||||||
bool bShouldLookupTexture = false;
|
bool bShouldLookupTexture = false;
|
||||||
|
|
|
@ -67,7 +67,6 @@ struct Surface
|
||||||
std::vector<vec2> lightmapCoords;
|
std::vector<vec2> lightmapCoords;
|
||||||
//std::vector<bool> coveragemask;
|
//std::vector<bool> coveragemask;
|
||||||
std::vector<vec3> samples;
|
std::vector<vec3> samples;
|
||||||
std::vector<vec3> indirect;
|
|
||||||
SurfaceType type;
|
SurfaceType type;
|
||||||
int typeIndex;
|
int typeIndex;
|
||||||
IntSector *controlSector;
|
IntSector *controlSector;
|
||||||
|
|
Loading…
Reference in a new issue