PDA

View Full Version : Texture scale


Thargos
29-10-2007, 01:31 AM
Is there any math problem I can use to find what a texture's dimensions should be when I use UI scale? My UI scale is .64 and this is what I did to get what should be the texture size at that scale:

for a 512 px wide

512*0.64=327.68
512-327.68=184.32
512+184.32=696.32

That should be the right dimension for the texture at .64 UI scale..right?

Thanks for any help with this.

Tunga
29-10-2007, 09:51 AM
Isn't it just height*scale and width*scale? Why would it get bigger at 0.64 scale compared to 1.0 scale? I'm probably missing something obvious here.

Thargos
29-10-2007, 07:50 PM
.64 is smaller than 1, and textures get scaled with the UI scale, so they would need to be bigger...i think..:/

Tunga
30-10-2007, 12:40 AM
Oh I see what you're getting at, you want to know what size you should make a texture in order for it to show up at the size you want given UI scale 0.64, okay that makes sense.

Basically you just do (1 / 0.64) = 1.5625. So multiply the size you want it to be by 1.5625 to get the size you should make it. In the case of 512 as in your example that would give you 800 exactly.

If you think about it, this makes sense: If you used a scale of 0.5 then you'd want to double everything, and this is agreed by (1 / 0.5) = 2.

Thargos
30-10-2007, 08:27 PM
800 is waay to big...I hate using textures..

Tunga
31-10-2007, 01:24 AM
800 x 0.64 = 512 so that should work. You realise tha 512 is like a half or a third of the screen width (roughly, depending on resolution) right (i.e. yes it will be quite big)?

Thargos
31-10-2007, 01:26 AM
1280= two 512 (width) and one 256 (width)..I'm just going to do a chim remake now :P