Changed GetSubImagePixelValue parameter order so x,y are first
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
This commit is contained in:
@@ -87,7 +87,7 @@ namespace AZ
|
||||
|
||||
//! Get image pixel value for specified mip and slice
|
||||
template<typename T>
|
||||
T GetSubImagePixelValue(uint32_t mip, uint32_t slice, uint32_t x, uint32_t y, uint32_t componentIndex = 0);
|
||||
T GetSubImagePixelValue(uint32_t x, uint32_t y, uint32_t componentIndex = 0, uint32_t mip = 0, uint32_t slice = 0);
|
||||
|
||||
//! Returns streaming image pool asset id of the pool that will be used to create the streaming image.
|
||||
const Data::AssetId& GetPoolAssetId() const;
|
||||
|
||||
@@ -215,7 +215,7 @@ namespace AZ
|
||||
}
|
||||
|
||||
template<>
|
||||
float StreamingImageAsset::GetSubImagePixelValue<float>(uint32_t mip, uint32_t slice, uint32_t x, uint32_t y, uint32_t componentIndex)
|
||||
float StreamingImageAsset::GetSubImagePixelValue<float>(uint32_t x, uint32_t y, uint32_t componentIndex, uint32_t mip, uint32_t slice)
|
||||
{
|
||||
// TODO: Use the component index
|
||||
(void)componentIndex;
|
||||
@@ -235,7 +235,7 @@ namespace AZ
|
||||
}
|
||||
|
||||
template<>
|
||||
AZ::u32 StreamingImageAsset::GetSubImagePixelValue<AZ::u32>(uint32_t mip, uint32_t slice, uint32_t x, uint32_t y, uint32_t componentIndex)
|
||||
AZ::u32 StreamingImageAsset::GetSubImagePixelValue<AZ::u32>(uint32_t x, uint32_t y, uint32_t componentIndex, uint32_t mip, uint32_t slice)
|
||||
{
|
||||
// TODO: Use the component index
|
||||
(void)componentIndex;
|
||||
|
||||
@@ -198,7 +198,7 @@ namespace GradientSignal
|
||||
uint32_t x = static_cast<uint32_t>(pixelLookup.GetX()) % width;
|
||||
uint32_t y = static_cast<uint32_t>(pixelLookup.GetY()) % height;
|
||||
|
||||
return imageAsset->GetSubImagePixelValue<float>(0, 0, x, y, 0);
|
||||
return imageAsset->GetSubImagePixelValue<float>(x, y);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user