WelcomeUser Guide
ToSPrivacyCanary
DonateBugsLicense

©2024 Poal.co

502

Can someone please resize this for my SVGA screen?

Can someone please resize this for my SVGA screen?

(post is archived)

[–] 1 pt

It was complex in my mind. :)

[–] 1 pt

https://en.wikipedia.org/wiki/Power_of_two#Computer_science

>Two to the exponent of n, written as 2n, is the number of ways the bits in a binary word of length n can be arranged. A word, interpreted as an unsigned integer, can represent values from 0 (000...0002) to 2n − 1 (111...1112) inclusively. Corresponding signed integer values can be positive, negative and zero; see signed number representations. Either way, one less than a power of two is often the upper bound of an integer in binary computers. As a consequence, numbers of this form show up frequently in computer software. As an example, a video game running on an 8-bit system might limit the score or the number of items the player can hold to 255—the result of using a byte, which is 8 bits long, to store the number, giving a maximum value of 28 − 1 = 255. For example, in the original Legend of Zelda the main character was limited to carrying 255 rupees (the currency of the game) at any given time, and the video game Pac-Man famously has a kill screen at level 256.

https://en.wikipedia.org/wiki/Power_of_two#Base_of_the_binary_numeral_system

>Because two is the base of the binary numeral system, powers of two are common in computer science. Written in binary, a power of two always has the form 100...000 or 0.00...001, just like a power of 10 in the decimal system.

https://gamedev.stackexchange.com/questions/26187/why-are-textures-always-square-powers-of-two-what-if-they-arent

>As Byte56 implied, the "power of two" size restrictions are (were) that each dimension must be, independently, a power of two, not that textures must be square and have dimensions which are a power of two. However, on modern cards and which modern graphics APIs, this "restriction" has been relaxed significantly such that textures dimensions can be, within reason, just about anything you like. However: "Wouldn't it be smart to save on the game's file size and make the texture exactly fit the UV unwrapped model? What would happen if there was a texture that was not a power of two?" By ensuring the texture dimensions are a power of two, the graphics pipeline can take advantage of optimizations related to efficiencies in working with powers of two. For example, it can be (and absolutely was several years back before we had dedicated GPUs and extremely clever optimizing compilers) faster to divide and multiply by powers of two. Working in powers of two also simplified operations within the pipeline, such as computation and usage of mipmaps (a number that is a power of two will always divide evenly in half, which means you don't have to deal with scenarios where you must round your mipmap dimensions up or down). It's true you "waste" some space this way, but the extra space is usually worth it for the tradeoff in render performance. Additionally there are techniques, such as compression or packing multiple images into a single texture space that can alleviate some of the storage waste.