Hello guys,
I’m sort of confused regarding the texture memory issue. Could you please help me sort out these questions?
QUESTION 1)
I read somewhere here that now image sheets don’t have to be the power of 2 (e.g. 512, 1024 etc)
Does it mean that I can load an image of size 120x120 and it will occupy that exact size in texture memory?
Or it will consume the round up to power of two, so it would take 128x128 in memory?
example1:
file: some.png (120x120)
code:
local sheet = { frames = { { name = "some.png", x = 0, y = 0, width = 120, height = 120 }, }
will reserve 120x120 or it will round up to 128x128 pixels in memory?
QUESTION 2)
What consumes texture memory: the ACTUAL image file dimensions in pixels
OR - the size I say in my code that the image has if I want to down or upscale it.
example:
file: some.png (1024x1024)
code:
local sheet = { frames = { -- frame #1 { name = "some.png", x = 0, y = 0, width = 512, height = 512 }, -- frame #2 { name = "some.png", x = 0, y = 0, width = 2048, height = 2048 }, }
here frame #1 will reserve: 512x512 and frame #2: 2048x2048, or both will take 1024x1024 pixels in memory?
I hope I was clear enough so you get my point
thanks!