mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-27 23:01:55 +00:00
Fix Cubemap mipmap sizes
This commit is contained in:
@ -219,11 +219,6 @@ TextureType TextureCube::GetTextureType() const
|
||||
}
|
||||
|
||||
int TextureCube::GetFaceCount() const
|
||||
{
|
||||
return 6;
|
||||
}
|
||||
|
||||
size_t TextureCube::GetSizeOfMipLevel(const int mipLevel) const
|
||||
{
|
||||
return FACE_COUNT;
|
||||
}
|
||||
|
@ -93,7 +93,6 @@ public:
|
||||
|
||||
int GetFaceCount() const override;
|
||||
|
||||
size_t GetSizeOfMipLevel(int mipLevel) const override;
|
||||
uint8_t* GetBufferForMipLevel(int mipLevel, int face) override;
|
||||
};
|
||||
|
||||
|
@ -158,7 +158,7 @@ void TextureConverter::ReorderUnsignedToUnsigned() const
|
||||
|
||||
for (auto mipLevel = 0; mipLevel < mipCount; mipLevel++)
|
||||
{
|
||||
const auto mipLevelSize = m_input_texture->GetSizeOfMipLevel(mipLevel);
|
||||
const auto mipLevelSize = m_input_texture->GetSizeOfMipLevel(mipLevel) * m_input_texture->GetFaceCount();
|
||||
const auto* inputBuffer = m_input_texture->GetBufferForMipLevel(mipLevel);
|
||||
auto* outputBuffer = m_output_texture->GetBufferForMipLevel(mipLevel);
|
||||
|
||||
|
Reference in New Issue
Block a user