Slide 57
Slide 57 text
Look for supported Sizes
3) Pick the closest one you can get
[4032x3024, 4000x3000, 3840x2160,
4000x2000, 3264x2448, 3200x2400,
2688x1512, 2592x1944, 2048x1536,
1920x1440, 1920x1080, 1600x1200,
1920x960, 1280x960, 1280x768,
1280x720, 1024x768, 800x400,
800x600, 800x480, 720x480,
640x400, 640x480, 640x360,
352x288, 320x240, 176x144,
160x120]
// textureWidth = 1080
// textureHeight = 2080
if (op.width >= textureWidth &&
op.height >= textureHeight) {
bigEnough.add(op)
} else {
notBigEnough.add(op)
}
- If candidates are larger than texture size, pick the smallest
return when {
bigEnough.size > 0 -> bigEnough.sortedWith(area()).first()
notBigEnough.size > 0 -> notBigEnough.sortedWith(area()).last()
}
- If candidates are smaller than texture size, pick the largest