summaryrefslogtreecommitdiffstats
path: root/src/runtimerender/Qt3DSRenderUIPSharedTranslation.h
diff options
context:
space:
mode:
authorJere Tuliniemi <jere.tuliniemi@qt.io>2019-09-17 12:22:23 +0300
committerJere Tuliniemi <jere.tuliniemi@qt.io>2019-09-19 12:46:07 +0300
commit814d037a67c827a5eef0f3d166d5ada498f408fb (patch)
treeaaebc2179e5e95f2c8863dc72630748470829e19 /src/runtimerender/Qt3DSRenderUIPSharedTranslation.h
parent9395963fdef3030136c242dc27bbd5e17566f054 (diff)
Add transparency mode selection to standard materials
ASTC textures would need to be decompressed upon loading to scan for transparency, or the texture files would need their own user-defined settings to enable transparency. Instead, as a work-around, materials can be forced to be treated as transparent without manipulating opacity. This is implemented with a transparency mode drop down list containing "Default", "Force Transparent" and "Force Opaque" options. "Force Opaque" can be used to force the material to be treated as opaque even when the textures used are transparent. By default ASTC textures are treated as non-transparent. Task-number: QT3DS-3904 Change-Id: I22255ffb2e2be5efea3e56466d58ddcc46490bb2 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Janne Kangas <janne.kangas@qt.io> Reviewed-by: Antti Määttä <antti.maatta@qt.io>
Diffstat (limited to 'src/runtimerender/Qt3DSRenderUIPSharedTranslation.h')
-rw-r--r--src/runtimerender/Qt3DSRenderUIPSharedTranslation.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/runtimerender/Qt3DSRenderUIPSharedTranslation.h b/src/runtimerender/Qt3DSRenderUIPSharedTranslation.h
index 06c6346..01740e6 100644
--- a/src/runtimerender/Qt3DSRenderUIPSharedTranslation.h
+++ b/src/runtimerender/Qt3DSRenderUIPSharedTranslation.h
@@ -169,6 +169,12 @@ namespace render {
};
template <>
+ struct SEnumParseMap<DefaultMaterialTransparencyMode::Enum>
+ {
+ static SEnumNameMap *GetMap();
+ };
+
+ template <>
struct SEnumParseMap<TessModeValues::Enum>
{
static SEnumNameMap *GetMap();
@@ -418,6 +424,7 @@ namespace render {
HANDLE_QT3DS_RENDER_PROPERTY(Material, SpecularAmount, Dirty) \
HANDLE_QT3DS_RENDER_PROPERTY(Material, SpecularRoughness, Dirty) \
HANDLE_QT3DS_RENDER_PROPERTY(Material, RoughnessMap, Dirty) \
+ HANDLE_QT3DS_RENDER_ENUM_PROPERTY(Material, TransparencyMode, Dirty) \
HANDLE_QT3DS_RENDER_OPACITY_PROPERTY(Material, Opacity, Dirty) \
HANDLE_QT3DS_RENDER_PROPERTY(Material, OpacityMap, Dirty) \
HANDLE_QT3DS_RENDER_PROPERTY(Material, BumpMap, Dirty) \