Core/Color: Switch formal from RGBA8 to RGBA32F

This commit is contained in:
SirLynix
2022-04-23 16:08:15 +02:00
parent de53c88c01
commit e7274b24e9
32 changed files with 331 additions and 196 deletions

View File

@@ -376,7 +376,7 @@ std::shared_ptr<Mesh> LoadMesh(Stream& stream, const MeshParams& parameters)
aiColor4D color;
if (aiGetMaterialColor(aiMat, aiKey, aiType, aiIndex, &color) == aiReturn_SUCCESS)
{
matData.SetParameter(colorKey, Color(static_cast<UInt8>(color.r * 255), static_cast<UInt8>(color.g * 255), static_cast<UInt8>(color.b * 255), static_cast<UInt8>(color.a * 255)));
matData.SetParameter(colorKey, Color(color.r, color.g, color.b, color.a));
}
};
@@ -555,7 +555,7 @@ std::shared_ptr<Mesh> LoadMesh(Stream& stream, const MeshParams& parameters)
for (unsigned int vertexIdx = 0; vertexIdx < vertexCount; ++vertexIdx)
{
aiColor4D color = iMesh->mColors[0][vertexIdx];
*colorPtr++ = Color(UInt8(color.r * 255.f), UInt8(color.g * 255.f), UInt8(color.b * 255.f), UInt8(color.a * 255.f));
*colorPtr++ = Color(color.r, color.g, color.b, color.a);
}
}
else
@@ -586,7 +586,7 @@ std::shared_ptr<Mesh> LoadMesh(Stream& stream, const MeshParams& parameters)
aiColor4D color;
if (aiGetMaterialColor(aiMat, aiKey, aiType, aiIndex, &color) == aiReturn_SUCCESS)
{
matData.SetParameter(colorKey, Color(static_cast<UInt8>(color.r * 255), static_cast<UInt8>(color.g * 255), static_cast<UInt8>(color.b * 255), static_cast<UInt8>(color.a * 255)));
matData.SetParameter(colorKey, Color(color.r, color.g, color.b, color.a));
}
};