summaryrefslogtreecommitdiffstats
path: root/src/runtimerender/Qt3DSRenderCustomMaterialSystem.cpp
diff options
context:
space:
mode:
authorAntti Määttä <antti.maatta@qt.io>2019-06-25 12:47:00 +0300
committerAntti Määttä <antti.maatta@qt.io>2019-06-28 09:31:06 +0300
commit3a014b324f1948192cb973c62c40150464ce5aa2 (patch)
treed39fc14754d878313d94d256f0f1f79d9209f650 /src/runtimerender/Qt3DSRenderCustomMaterialSystem.cpp
parenta0eef0c702b06e442db90a3b6ef1b488e67b63f5 (diff)
Fix progressive antialiasing
There were two problems with the antialiasing. The default materials inside container were never cleared dirty. The subpresentation rendering didn't correctly set the dirty flags when the same subpresentation is rendered multiple times. Task-number: QT3DS-1796 Change-Id: Ice1942ec4b919df009c59aa3ffdfc8efd430db1e Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Jari Karppinen <jari.karppinen@qt.io> Reviewed-by: Pasi Keränen <pasi.keranen@qt.io>
Diffstat (limited to 'src/runtimerender/Qt3DSRenderCustomMaterialSystem.cpp')
-rw-r--r--src/runtimerender/Qt3DSRenderCustomMaterialSystem.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/runtimerender/Qt3DSRenderCustomMaterialSystem.cpp b/src/runtimerender/Qt3DSRenderCustomMaterialSystem.cpp
index aaf799f..a6fb9ee 100644
--- a/src/runtimerender/Qt3DSRenderCustomMaterialSystem.cpp
+++ b/src/runtimerender/Qt3DSRenderCustomMaterialSystem.cpp
@@ -1975,7 +1975,7 @@ struct SMaterialSystem : public ICustomMaterialSystem
// TODO - return more information, specifically about transparency (object is transparent,
// object is completely transparent
bool PrepareForRender(const SModel & /*inModel*/, const SRenderSubset & /*inSubset*/,
- SCustomMaterial &inMaterial, bool clearMaterialDirtyFlags) override
+ SCustomMaterial &inMaterial) override
{
SMaterialClass *theMaterialClass = GetMaterialClass(inMaterial.m_ClassName);
if (theMaterialClass == NULL) {
@@ -1990,8 +1990,6 @@ struct SMaterialSystem : public ICustomMaterialSystem
inMaterial.m_hasVolumetricDF = false;
bool wasDirty = inMaterial.IsDirty() || theMaterialClass->m_AlwaysDirty;
- if (clearMaterialDirtyFlags)
- inMaterial.UpdateDirtyForFrame();
return wasDirty;
}