Allow any size image upload if square size <= 1024^2

As a developer, using spritesheets is extremely annoying because I have to wrap sprites to multiple lines due to the 1024 width limit, making finding the ImageRectOffset for each sprite over-complicated.

With multiple lines:

function selectSprite(n, imageSize, spriteSize)
    local spritesPerColumn = imageSize/spriteSize

    local column = math.floor(n/spritesPerColumn)
	local row = n%spritesPerColumn
	
	return Vector2.new(column*spriteSize,row*spriteSize)
end

With all sprites on one line:

function selectSprite(n, spriteSize)
    return Vector2.new(n*spriteSize,0)
end

If Roblox is able to address this issue, using spritesheets would be easier. Maybe a spritesheet API or object would be the most useful long-term, but allowing width/height to be any size so long as the square size of the image never exceeds 1024^2 would accomplish the same thing without the need to design and implement an API, while also allowing for higher-resolution elongated images (e.g. beams) that are still under the 1024^2 limit.

10 Likes

I don’t know too much about it, but this probably isn’t feasible due to hardware texture dimension limits. As the length on any one dimension increases, the texture becomes compatible with less and less hardware. 1024 is relatively small, so it’s compatible with most GPUs.

1 Like