Added support for several UNORM_SRGB formats

Signed-off-by: Chris Galvan <chgalvan@amazon.com>
This commit is contained in:
Chris Galvan
2022-02-14 11:10:58 -06:00
parent 49cd9584f2
commit 8cf29ebc25
12 changed files with 56 additions and 152 deletions
@@ -360,18 +360,6 @@ void ReflectedPropertyControl::CreateItems(XmlNodeRef node, CVarBlockPtr& outBlo
textureVar->Set(textureName);
}
}
else if (!azstricmp(type, "color"))
{
CSmartVariable<Vec3> colorVar;
AddVariable(group, colorVar, child->getTag(), humanReadableName.toUtf8().data(), strDescription.toUtf8().data(), func, pUserData, IVariable::DT_COLOR);
ColorB color;
if (child->getAttr("value", color))
{
ColorF colorLinear = ColorGammaToLinear(QColor(color.r, color.g, color.b));
Vec3 colorVec3(colorLinear.r, colorLinear.g, colorLinear.b);
colorVar->Set(colorVec3);
}
}
}
}