Zero-K icon indicating copy to clipboard operation
Zero-K copied to clipboard

Upsize cursors to power of 2

Open GoogleFrog opened this issue 11 years ago • 7 comments

All cursor images need their size increased to their next largest power of 2. This is because some graphics cards cannot deal with anything else.

The upscale should simply add a transparent border to the cursors, do not rescale. Also pay attention to the hotspot of each cursor.

GoogleFrog avatar Apr 18 '15 12:04 GoogleFrog

engine already handles that

jk3064 avatar Apr 18 '15 17:04 jk3064

@GoogleFrog how do we know its the power-of-2 problem?

I found script for Window's Powershell and ImageMagick program that could automate padding all files into a rectangle of power-of-2, but how sure its needed?

script: http://viziblr.com/news/2012/1/11/recursive-batch-image-conversion-with-powershell-and-imagema.html http://www.fmwconcepts.com/imagemagick/tidbits/image.php#power2_pad

xponen avatar Apr 18 '15 17:04 xponen

assigning to self

sprunk avatar Apr 19 '15 00:04 sprunk

jK has does the engine handle it in 98.0.1-451? We have reports of some cursors being invisible and the image sizes was a possible problem.

GoogleFrog avatar Apr 19 '15 10:04 GoogleFrog

hasn't changed, code is here: https://github.com/spring/spring/blob/develop/rts/Game/UI/HwMouseCursor.cpp#L311

if at all you changed something, e.g. changed cursor images to something too large (some gpu drivers only support 48x48, some 96x96, and very rare do 128x128)

jk3064 avatar Apr 21 '15 04:04 jk3064

I checked all the cursor icon, all now have 32x32 or 64x64 as nearest power-of-2 size

Original size: non-power-of-2 size for optional cursor set: 17x21 21x21 26x26 20x20 39x39 42x42

for zk set: 24x24 27x27 40x40 48x36 48x48

xponen avatar Apr 21 '15 23:04 xponen

all cursor icon have been upsized to nearest pow-of-2

xponen avatar May 01 '15 21:05 xponen