GradientSignal
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -259,7 +259,7 @@ namespace
|
||||
for (AZStd::size_t i = 0; i < channels; ++i)
|
||||
{
|
||||
min = AZStd::min(min, Lerp(min,
|
||||
arr[i], IsActive(i, mask)));
|
||||
arr[i], IsActive(static_cast<AZ::u8>(i), mask)));
|
||||
}
|
||||
|
||||
return min;
|
||||
@@ -273,7 +273,7 @@ namespace
|
||||
for (AZStd::size_t i = 0; i < channels; ++i)
|
||||
{
|
||||
max = AZStd::max(max, Lerp(max,
|
||||
arr[i], IsActive(i, mask)));
|
||||
arr[i], IsActive(static_cast<AZ::u8>(i), mask)));
|
||||
}
|
||||
|
||||
return max;
|
||||
@@ -287,7 +287,7 @@ namespace
|
||||
|
||||
for (AZStd::size_t i = 0; i < channels; ++i)
|
||||
{
|
||||
AZ::u8 result = IsActive(i, mask);
|
||||
AZ::u8 result = IsActive(static_cast<AZ::u8>(i), mask);
|
||||
total += result * arr[i];
|
||||
active += result;
|
||||
}
|
||||
@@ -493,7 +493,7 @@ namespace GradientSignal
|
||||
newAsset->m_imageFormat = OperationHelper(settings.m_rgbTransform, newAsset->m_imageFormat, mask, settings.m_alphaTransform, newAsset->m_imageData);
|
||||
newAsset->m_imageFormat = ConvertBufferType(newAsset->m_imageData, newAsset->m_imageFormat, ExportFormatToPixelFormat(settings.m_format),
|
||||
settings.m_autoScale, AZStd::make_pair(settings.m_scaleRangeMin, settings.m_scaleRangeMax));
|
||||
newAsset->m_bytesPerPixel = newAsset->m_imageData.size() / aznumeric_cast<AZStd::size_t>(newAsset->m_imageWidth * newAsset->m_imageHeight);
|
||||
newAsset->m_bytesPerPixel = static_cast<AZ::u8>(newAsset->m_imageData.size() / aznumeric_cast<AZStd::size_t>(newAsset->m_imageWidth * newAsset->m_imageHeight));
|
||||
|
||||
return newAsset;
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace
|
||||
|
||||
asset.m_imageWidth = dimensions;
|
||||
asset.m_imageHeight = dimensions;
|
||||
asset.m_bytesPerPixel = bytesPerPixel;
|
||||
asset.m_bytesPerPixel = static_cast<AZ::u8>(bytesPerPixel);
|
||||
asset.m_imageFormat = format;
|
||||
asset.m_imageData.resize(asset.m_bytesPerPixel * asset.m_imageWidth * asset.m_imageHeight);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user