diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/GSI.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/GSI.preset index 1f4f455b89..21c44ce271 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/GSI.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/GSI.preset @@ -6,7 +6,7 @@ "DefaultPreset": { "UUID": "{C5E76E09-39FA-411F-B2E2-15B47BB6AB5F}", "Name": "GSI", - "OutputTypeHandling": "UseInputFormatAndBitDepth", + "OutputTypeHandling": "UseInputFormat", "IsPowerOf2": true, "MipMapSetting": { "MipGenType": "Box" @@ -16,7 +16,7 @@ "android": { "UUID": "{C5E76E09-39FA-411F-B2E2-15B47BB6AB5F}", "Name": "GSI", - "OutputTypeHandling": "UseInputFormatAndBitDepth", + "OutputTypeHandling": "UseInputFormat", "MaxTextureSize": 2048, "IsPowerOf2": true, "MipMapSetting": { @@ -26,7 +26,7 @@ "ios": { "UUID": "{C5E76E09-39FA-411F-B2E2-15B47BB6AB5F}", "Name": "GSI", - "OutputTypeHandling": "UseInputFormatAndBitDepth", + "OutputTypeHandling": "UseInputFormat", "MaxTextureSize": 2048, "IsPowerOf2": true, "MipMapSetting": { @@ -36,7 +36,7 @@ "mac": { "UUID": "{C5E76E09-39FA-411F-B2E2-15B47BB6AB5F}", "Name": "GSI", - "OutputTypeHandling": "UseInputFormatAndBitDepth", + "OutputTypeHandling": "UseInputFormat", "IsPowerOf2": true, "MipMapSetting": { "MipGenType": "Box" @@ -45,7 +45,7 @@ "provo": { "UUID": "{C5E76E09-39FA-411F-B2E2-15B47BB6AB5F}", "Name": "GSI", - "OutputTypeHandling": "UseInputFormatAndBitDepth", + "OutputTypeHandling": "UseInputFormat", "IsPowerOf2": true, "MipMapSetting": { "MipGenType": "Box" diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/PresetSettings.cpp b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/PresetSettings.cpp index eb37f3e4b9..e78dfe88b6 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/PresetSettings.cpp +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/PresetSettings.cpp @@ -134,8 +134,8 @@ namespace ImageProcessingAtom ; serialize->Enum() - ->Value("Default", OutputTypeHandling::USE_SPECIFIED_OUTPUT_TYPE) - ->Value("UseInputFormatAndBitDepth", OutputTypeHandling::USE_INPUT_FORMAT_AND_BIT_DEPTH) + ->Value("Default", OutputTypeHandling::UseSpecifiedOutputType) + ->Value("UseInputFormat", OutputTypeHandling::UseInputFormat) ; } } diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/PresetSettings.h b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/PresetSettings.h index 5caa49d4da..348fff989d 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/PresetSettings.h +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/PresetSettings.h @@ -28,8 +28,8 @@ namespace ImageProcessingAtom //! Custom overrides for how to handle the output format enum OutputTypeHandling { - USE_SPECIFIED_OUTPUT_TYPE = 0, - USE_INPUT_FORMAT_AND_BIT_DEPTH + UseSpecifiedOutputType = 0, + UseInputFormat }; PresetSettings(); @@ -111,7 +111,7 @@ namespace ImageProcessingAtom AZStd::string m_swizzle; //! Controls how the output type format is derived - OutputTypeHandling m_outputTypeHandling = USE_SPECIFIED_OUTPUT_TYPE; + OutputTypeHandling m_outputTypeHandling = UseSpecifiedOutputType; protected: void DeepCopyMembers(const PresetSettings& other); diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageConvert.cpp b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageConvert.cpp index 0de941b85e..f2a071a2e5 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageConvert.cpp +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageConvert.cpp @@ -537,20 +537,20 @@ namespace ImageProcessingAtom // Convert to a pixel format based on the desired handling // The default behavior will choose the output format specified by the preset + EPixelFormat outputFormat; switch (m_input->m_presetSetting.m_outputTypeHandling) { - case PresetSettings::OutputTypeHandling::USE_INPUT_FORMAT_AND_BIT_DEPTH: - { - EPixelFormat sourceInputFormat = m_input->m_inputImage->GetPixelFormat(); - m_image->ConvertFormat(sourceInputFormat); - } + case PresetSettings::OutputTypeHandling::UseInputFormat: + outputFormat = m_input->m_inputImage->GetPixelFormat(); break; - case PresetSettings::OutputTypeHandling::USE_SPECIFIED_OUTPUT_TYPE: + case PresetSettings::OutputTypeHandling::UseSpecifiedOutputType: default: - m_image->ConvertFormat(m_input->m_presetSetting.m_pixelFormat); + outputFormat = m_input->m_presetSetting.m_pixelFormat; break; } + m_image->ConvertFormat(outputFormat); + return true; }