are 'power of 2' dimensions still relevant for DX11?

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Sorry for starting a new thread about this, as I think this has been stated somewhere already, but after googling and searching the forum, I couldn't find it.

    It's well known that in DX9 mode, the engine treats graphics as if they're in set sizes, based on the power of 2, like 32x32, 64x64, 128x128. So in terms of how much RAM/VRAM is actually consumed, a 400x400 graphic becomes 512x512, for example, while a 513x1025 graphic would become 1024x2048.

    I think I read once that this no longer applies in DX11 mode (ie. a 174x298 graphic will consume 174x298 worth of resources only). Is that the case? And if so, does it apply across the board, or just partially (eg. a 174x298 graphic consumes fewer resources in runtime than 256x512, but the same amount in edit-time....or perhaps it consumes less RAM, but still makes the GPU work harder to 'draw' more empty pixels)?

    Please login to see this link.
    My Fusion Tools: Please login to see this link. | Please login to see this link. | Please login to see this link.

  • Its how all computers work really. That's why we went 8bit 16bit 32bit 64bit 128bit. Relates to all processes on computers as far as i understand it not just the graphics pipe.

  • So Fusion consolidates the graphics into these internal spritesheets, yes? Wouldn't larger graphics force it to use more spritesheets, therefore more resources?

    So if four 512x512 graphics become consolidated into one 2048x2048 spritesheet, wouldn't four 513x513 graphics force Fusion to use two spritesheets?

    Does Fusion maybe crop transparent pixels before it consolidates into spritesheets?

    Please login to see this link.
    My Fusion Tools: Please login to see this link. | Please login to see this link. | Please login to see this link.

  • Because 2048x2048 is a square it would fit 16 512x512 graphics. Odd sizes effecting the use of extra sprite sheets though. Odd sizes outside power of 2 wont fit neatly. You could of course have a 513 size and then the space around it can be filled in with smaller graphics. All that happens is gaps are left. The tiles are arranged to be closest to the tile sheet size.

  • Ah yes, of course, 16, not 4 X)

    OK, so it sounds like there's no need to stick to power-of-2 dimensions for the sake of it anymore, but trimming off transparent pixels probably would make a positive difference, unless Fusion trims them itself. For example, some of my graphics at the moment are set up like this:

    Please login to see this picture.

    The visible part of this block platform is ~300x300px, but I set it up as a 500x500px PNG in Photoshop. I figured I'd leave myself extra space to work with in case I want to add some larger elements one day, since that space in DX9 is 'free' anyway (it becomes 512x512 either way). But now that I'm using DX11 mode, I guess wasted space around the margins like that is likely to clog up spritesheets and force Fusion to use more of them.

    Yves: What happens when I import a graphic during runtime (using "load frame" - eg. replacing a small existing 32x32 animation frame with a large 500x500 PNG)? Does Fusion try to squeeze it into a pre-existing spritesheet?

    Please login to see this link.
    My Fusion Tools: Please login to see this link. | Please login to see this link. | Please login to see this link.

  • Fusion doesn't crop images. Also it keeps a 1 or 2-pixel space between images in a spritesheet.

    When you add a new image, Fusion tries to add it to existing sprite sheets, yes. And if there is no space for it in existing sprite sheets, it creates a new one.

  • Shaders are rendered in real-time, if your app is running 60 times per second (and your GPU can keep with it), it will render it 60 times per second...
    If you try a software to see the renderization process, it's clear that the image stored in the GPU/memory is the original without the shader.
    This is also why different from Set Pixel Color action, which affects all instances, you can have the instances of the object with different shaders (and shader parameters).

    Now, about "display other sprites in the sheet", it would possibly only work with vertex shaders or something, may also be the reason why it's not implemented on DX11...

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!