Welcome,
Guest
. Please
login
or
register
.
June 10, 2026, 04:46:35 AM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Limit to texture size in atlas?
« previous
next »
Print
Pages: [
1
]
Author
Topic: Limit to texture size in atlas? (Read 4769 times)
Alan Gray
Guest
Limit to texture size in atlas?
«
on:
May 23, 2012, 06:15:35 PM »
Any reason this shouldn't work? I'm adding a single 2048x1536 (NPOT) RGBA 32-bit texture to an atlas and it's getting cropped (not scaled) to 1536x1152 (cropped to bottom left). I'm doing exactly the same thing in two other atlases with smaller textures (512x384 and 1024x768) and they are not getting chopped.
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: Limit to texture size in atlas?
«
Reply #1 on:
May 23, 2012, 09:02:40 PM »
Well, 2048 on one dimension means it won't fit into a 2048x2048 texture, and Unity clamps textures to 2048x2048 when you're targeting iOS/Android.
I suggest you just use UITexture for this instead of trying to put it in an atlas.
Logged
Alan Gray
Guest
Re: Limit to texture size in atlas?
«
Reply #2 on:
May 23, 2012, 09:48:53 PM »
lol. Why doesn't a 2048 wide texture fit into a 2048x2048 atlas? Is it the 1 pixel padding? I thought I tried turning that off and it still got cropped.
The whole point of what I'm doing right now is testing a triple-atlas solution to support 480x360 up to 2048x1536 resolution. We need pixel-perfect at all resolutions - including background textures. If I can't make the 2048 wide background texture work, then atlas swapping won't cover this one texture and it will have to be special cased. Not the end of the world - but kind of a pain.
Thanks!
Logged
Alan Gray
Guest
Re: Limit to texture size in atlas?
«
Reply #3 on:
May 23, 2012, 10:01:28 PM »
I set the padding to 0 and it didn't get cropped. Should I expect edge artifacts with no padding? I have it set to clamp.
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: Limit to texture size in atlas?
«
Reply #4 on:
May 23, 2012, 10:10:01 PM »
As long as you've clamped it, it should be just fine.
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Limit to texture size in atlas?