MineOS/Libraries/OpenComputersGL
CoolCat467 299acd9a91
Fix materials.newDebugTexture and simplify
I was testing a copy of this in Python, and noticed that bStep and sStep appear to be swapped, as bStep changed b up by 1/height, but the loop is by width, leading b to exceed 1 if the height is smaller than width. This is only apparent if the width and height of the new debug texture is not the same. And then I also noticed that the whole "invert blackSquare in two places" part could be simplified to if x + y is an odd number for each pixel in the texture. I don't claim to know the specifics of how to make lua faster, and this may be slower, so whatever is better.
2022-01-07 22:46:43 -06:00
..