Updated per PR feedback
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -134,8 +134,8 @@ namespace ImageProcessingAtom
|
||||
;
|
||||
|
||||
serialize->Enum<OutputTypeHandling>()
|
||||
->Value("Default", OutputTypeHandling::USE_SPECIFIED_OUTPUT_TYPE)
|
||||
->Value("UseInputFormatAndBitDepth", OutputTypeHandling::USE_INPUT_FORMAT_AND_BIT_DEPTH)
|
||||
->Value("Default", OutputTypeHandling::UseSpecifiedOutputType)
|
||||
->Value("UseInputFormat", OutputTypeHandling::UseInputFormat)
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user