This commit is contained in:
Isuru Samarathunga
2025-09-22 20:52:16 +05:30
parent 28ca737c21
commit 8793554994
2 changed files with 5 additions and 2 deletions

View File

@ -59,8 +59,8 @@ namespace ia::iae
handles[i] = m_tileGrid.m_tileTextures[i].GetHandle();
m_bakedGPUTexture = GPUTexture::GridCombine(handles.data(), m_tileGrid.TileCountX, m_tileGrid.TileCountY,
m_tileGrid.TileWidth, m_tileGrid.TileHeight);
m_node->DrawnSize() = {w, h};
CurrentTexture() = Texture(m_bakedGPUTexture->GetHandle(), w, h);
PositionOffset() = m_tileGrid.Position;
}
VOID AtlasRendererComponent::Update()
@ -69,6 +69,9 @@ namespace ia::iae
VOID AtlasRendererComponent::Draw()
{
PositionOffset() = m_tileGrid.Position;
ScaleOffset() = {1.0f, 1.0f};
IsCameraRelative() = true;
TextureRendererComponent::Draw();
}
} // namespace ia::iae

View File

@ -90,7 +90,7 @@ namespace ia::iae
BOOL m_isFlippedV{};
BOOL m_shouldDrawOutline{};
glm::vec4 m_outlineColor{0.25f, 0.25f, 0.25f, 0.75f};
BOOL m_isCameraRelative{};
BOOL m_isCameraRelative{true};
glm::vec2 m_positionOffset{};
glm::vec2 m_scaleOffset{};
FLOAT32 m_rotationOffset{};