2006-04-21, 03:35
hi all,
i've just committed support for non-swizzled 32 bit textures in xbmc.
this includes a new xbmctex version which enables this by default (it can be disabled using the -onlyswizzled command line switch).
swizzled textures have to have each dimension a power of 2, which means that much of the ram taken up while in xbmc is wasted space - not efficient. they are, however, quicker to render which ofcourse is a bonus.
unswizzled textures just have to have their width a multiple of 64 pixels. this is a much less stringent requirement, thus less wasted space.
for comparison: in pm3, the old version of xbmctex produced a textures.xpr file whose textures were on average 46% wasted space.
the new version produces on average just 9.5% of wasted space.
this translates to 5.5mb of ram saved while in the pm3 home page.
one thing to note is that textures.xpr produced with the new xbmctex version will not work with older versions of xbmc.
a couple of other suggestions for saving ram:
1. keep wasted (transparent) space around images to a minimum. try and keep images inside the nearest power of 2, but if this is not possible, just try and keep within a 64 pixel width constraint.
2. if images do not change much (ie constant colour, or constant vertical gradient etc.) then consider breaking the bits up that don't follow the same pattern and use a small texture for the patterned piece (eg a vertical gradient can be done with a texture 1 pixel wide, stretched as far as you like horizontally).
hope these help.
cheers,
jonathan
i've just committed support for non-swizzled 32 bit textures in xbmc.
this includes a new xbmctex version which enables this by default (it can be disabled using the -onlyswizzled command line switch).
swizzled textures have to have each dimension a power of 2, which means that much of the ram taken up while in xbmc is wasted space - not efficient. they are, however, quicker to render which ofcourse is a bonus.
unswizzled textures just have to have their width a multiple of 64 pixels. this is a much less stringent requirement, thus less wasted space.
for comparison: in pm3, the old version of xbmctex produced a textures.xpr file whose textures were on average 46% wasted space.
the new version produces on average just 9.5% of wasted space.
this translates to 5.5mb of ram saved while in the pm3 home page.
one thing to note is that textures.xpr produced with the new xbmctex version will not work with older versions of xbmc.
a couple of other suggestions for saving ram:
1. keep wasted (transparent) space around images to a minimum. try and keep images inside the nearest power of 2, but if this is not possible, just try and keep within a 64 pixel width constraint.
2. if images do not change much (ie constant colour, or constant vertical gradient etc.) then consider breaking the bits up that don't follow the same pattern and use a small texture for the patterned piece (eg a vertical gradient can be done with a texture 1 pixel wide, stretched as far as you like horizontally).
hope these help.
cheers,
jonathan