change conversions to static_cast
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -76,9 +76,9 @@ namespace ImageProcessingAtom
|
||||
for (int r = 0; r < ePS_Red; ++r)
|
||||
{
|
||||
SColor col;
|
||||
col.r = aznumeric_cast<unsigned char>(255 * r / (ePS_Red));
|
||||
col.g = aznumeric_cast<unsigned char>(255 * g / (ePS_Green));
|
||||
col.b = aznumeric_cast<unsigned char>(255 * b / (ePS_Blue));
|
||||
col.r = static_cast<unsigned char>(255 * r / (ePS_Red));
|
||||
col.g = static_cast<unsigned char>(255 * g / (ePS_Green));
|
||||
col.b = static_cast<unsigned char>(255 * b / (ePS_Blue));
|
||||
int l = 255 - (col.r * 3 + col.g * 6 + col.b) / 10;
|
||||
col.r = col.g = col.b = (unsigned char)l;
|
||||
m_mapping.push_back(col);
|
||||
|
||||
@@ -97,8 +97,8 @@ namespace ImageProcessingAtom
|
||||
RHI::Format format = Utils::PixelFormatToRHIFormat(m_imageObject->GetPixelFormat(), m_imageObject->HasImageFlags(EIF_SRGBRead));
|
||||
RHI::ImageBindFlags bindFlag = RHI::ImageBindFlags::ShaderRead;
|
||||
|
||||
RHI::ImageDescriptor imageDesc = RHI::ImageDescriptor::Create2DArray(bindFlag, imageWidth, imageHeight, aznumeric_cast<uint16_t>(arraySize), format);
|
||||
imageDesc.m_mipLevels = aznumeric_cast<uint16_t>(m_imageObject->GetMipCount());
|
||||
RHI::ImageDescriptor imageDesc = RHI::ImageDescriptor::Create2DArray(bindFlag, imageWidth, imageHeight, static_cast<uint16_t>(arraySize), format);
|
||||
imageDesc.m_mipLevels = static_cast<uint16_t>(m_imageObject->GetMipCount());
|
||||
if (m_imageObject->HasImageFlags(EIF_Cubemap))
|
||||
{
|
||||
imageDesc.m_isCubemap = true;
|
||||
@@ -227,7 +227,7 @@ namespace ImageProcessingAtom
|
||||
{
|
||||
RPI::ImageMipChainAssetCreator builder;
|
||||
uint32_t arraySize = m_imageObject->HasImageFlags(EIF_Cubemap) ? 6 : 1;
|
||||
builder.Begin(chainAssetId, aznumeric_cast<uint16_t>(mipLevels), aznumeric_cast<uint16_t>(arraySize));
|
||||
builder.Begin(chainAssetId, static_cast<uint16_t>(mipLevels), static_cast<uint16_t>(arraySize));
|
||||
|
||||
for (uint32_t mip = startMip; mip < startMip + mipLevels; mip++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user