sprite mip fix #170

This commit is contained in:
Turanszki Janos
2020-11-02 00:55:38 +01:00
parent e2af651635
commit 2e73cdae05
4 changed files with 18 additions and 12 deletions
+2
View File
@@ -178,6 +178,8 @@ void RenderPath2D::Render() const
GraphicsDevice* device = wiRenderer::GetDevice();
CommandList cmd = device->BeginCommandList();
wiRenderer::ProcessDeferredMipGenRequests(cmd);
wiRenderer::GetDevice()->BindResource(PS, GetGUIBlurredBackground(), TEXSLOT_IMAGE_BACKGROUND, cmd);
// Special care for internal resolution, because stencil buffer is of internal resolution,
+12 -11
View File
@@ -3386,6 +3386,18 @@ void RenderImpostors(
}
}
void ProcessDeferredMipGenRequests(CommandList cmd)
{
deferredMIPGenLock.lock();
for (auto& it : deferredMIPGens)
{
MIPGEN_OPTIONS mipopt;
mipopt.preserve_coverage = it.second;
GenerateMipChain(*it.first->texture, MIPGENFILTER_LINEAR, cmd, mipopt);
}
deferredMIPGens.clear();
deferredMIPGenLock.unlock();
}
void UpdatePerFrameData(float dt, uint32_t layerMask)
{
@@ -3918,17 +3930,6 @@ void UpdateRenderData(CommandList cmd)
BindCommonResources(cmd);
// Process deferred MIP generation:
deferredMIPGenLock.lock();
for (auto& it : deferredMIPGens)
{
MIPGEN_OPTIONS mipopt;
mipopt.preserve_coverage = it.second;
GenerateMipChain(*it.first->texture, MIPGENFILTER_LINEAR, cmd, mipopt);
}
deferredMIPGens.clear();
deferredMIPGenLock.unlock();
// Update material constant buffers:
for (auto& materialIndex : pendingMaterialUpdates)
{
+3
View File
@@ -100,6 +100,9 @@ namespace wiRenderer
uint32_t flags = DRAWSCENE_OPAQUE
);
// Render mip levels for textures that reqested it:
void ProcessDeferredMipGenRequests(wiGraphics::CommandList cmd);
// Compute essential atmospheric scattering textures for skybox, fog and clouds
void RenderAtmosphericScatteringTextures(wiGraphics::CommandList cmd);
// Update atmospheric scattering primarily for environment probes.
+1 -1
View File
@@ -9,7 +9,7 @@ namespace wiVersion
// minor features, major updates, breaking API changes
const int minor = 49;
// minor bug fixes, alterations, refactors, updates
const int revision = 7;
const int revision = 8;
const std::string version_string = std::to_string(major) + "." + std::to_string(minor) + "." + std::to_string(revision);