Skip to content

Commit 790fb3b

Browse files
committed
fix bigtexture upload rounding
1 parent 992cdfe commit 790fb3b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Source/Renderer/BigTexture.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ void BigTexture::Update(const Box& updateRegion) {
9494
Box intersect = updateRegion.GetIntersection(m_Regions[i]);
9595
if (!intersect.IsEmpty()) {
9696
std::vector<unsigned char> pixels(std::ceilf(intersect.m_Width) * std::ceilf(intersect.m_Height) * bytesPerPixel);
97-
for (size_t y = 0; y < static_cast<int>(intersect.m_Height); y++) {
97+
for (size_t y = 0; y < static_cast<int>(std::ceilf(intersect.m_Height)); y++) {
9898
memcpy(
9999
pixels.data() + y * static_cast<int>(intersect.m_Width) * bytesPerPixel,
100100
m_Bitmap->line[y + intersect.m_Corner.GetFloorIntY()] + intersect.m_Corner.GetFloorIntX(),

0 commit comments

Comments
 (0)