mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-14 01:19:59 +00:00
Merge branch 'no_resize' into 'master'
[Postprocessing] Don't resize user defined samplers to power of 2 See merge request OpenMW/openmw!1918
This commit is contained in:
commit
14b9abbcbf
@ -103,7 +103,15 @@ namespace MWRender
|
||||
if (filtered.empty() || !bufferData.postprocessing)
|
||||
{
|
||||
if (bufferData.postprocessing)
|
||||
Log(Debug::Error) << "Critical error, postprocess shaders failed to compile. Using default shader.";
|
||||
{
|
||||
if (!mLoggedLastError)
|
||||
{
|
||||
Log(Debug::Error) << "Critical error, postprocess shaders failed to compile. Using default shader.";
|
||||
mLoggedLastError = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
mLoggedLastError = false;
|
||||
|
||||
mFallbackStateSet->setTextureAttributeAndModes(0, bufferData.sceneTex);
|
||||
|
||||
|
@ -82,6 +82,8 @@ namespace MWRender
|
||||
|
||||
mutable std::optional<fx::DispatchArray> mQueuedDispatchArray;
|
||||
mutable size_t mQueuedDispatchFrameId;
|
||||
|
||||
mutable bool mLoggedLastError = false;
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -378,7 +378,7 @@ namespace MWRender
|
||||
const auto lastWriteTime = std::filesystem::last_write_time(mTechniqueFileMap[technique->getName()]);
|
||||
const bool isDirty = technique->setLastModificationTime(lastWriteTime);
|
||||
|
||||
if (technique->isValid() && !isDirty)
|
||||
if (!isDirty)
|
||||
continue;
|
||||
|
||||
if (technique->compile())
|
||||
@ -671,6 +671,9 @@ namespace MWRender
|
||||
|
||||
bool PostProcessor::disableTechnique(std::shared_ptr<fx::Technique> technique, bool dirty)
|
||||
{
|
||||
if (Misc::StringUtils::ciEqual(technique->getName(), "main"))
|
||||
return false;
|
||||
|
||||
auto it = std::find(mTechniques.begin(), mTechniques.end(), technique);
|
||||
if (it == std::end(mTechniques))
|
||||
return false;
|
||||
|
@ -510,6 +510,7 @@ namespace fx
|
||||
if (proxy.internal_format.has_value())
|
||||
sampler->setSourceFormat(proxy.internal_format.value());
|
||||
sampler->setName(std::string{mBlockName});
|
||||
sampler->setResizeNonPowerOfTwoHint(false);
|
||||
|
||||
mTextures.emplace_back(sampler);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user