extension MTLRegion has wrong (+1) maxX maxY maxZ
atrbx5 opened this issue · 3 comments
atrbx5 commented
if my texture has size of 5
then my minX is 0
and my maxX is 4
with current implementation it's 5
public extension MTLRegion {
var maxX: Int {
return self.origin.x + self.size.width
}
var maxY: Int {
return self.origin.y + self.size.height
}
var maxZ: Int {
return self.origin.z + self.size.depth
}
s1ddok commented
hmmm, yes, this seems wrong. I will try to address this asap, would you love to hit a PR maybe?
s1ddok commented
took me a while but I finally fixed it lol
atrbx5 commented
took me a while but I finally fixed it lol
oh yeah... Feb 2022 I was a bit distracted from making PR ;) sorry