Possible to Layer Alpha Textures within Poly? Poly Stays Opaque No Sorting Issues.

This topic contains 4 replies, has 2 voices, and was last updated by  Diorama 3 years, 4 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #31718

    Diorama
    Member

    Hi,

    The questions pertains to mobile hardware.
    I gathered that most mobile GPU’s do TBR, and Alpha operations take a deferred path waisting resources and fps.
    I wonder if the following idea would keep the TBR intact without deferring to a slow render path.

    The idea is to have (1 bit) alpha textures layered and rendered on a poly/triangle.
    The poly itself can stay opaque.
    ? No sorting issues. Right?
    ? If so layering the textures can best be done on the GPU or CPU?
    ? What are the limitations, the number of textures?

    A pic to show what I mean.
    https://dl.dropboxusercontent.com/u/21897112/TBR/if_this-Dots.gif

    If the above is possible I’d like the the layered textures use another orientation as seen here:
    https://dl.dropboxusercontent.com/u/21897112/TBR/then_these-Dots-too.gif

    ? Can be done?

    #38765

    Joe Davis
    Member

    Alpha operations take a deferred path waisting resources and fps

    Alpha blending operations on PowerVR are actually quite fast, as read-modify-write colour operations use the GPU’s on-chip buffers. Alpha test operations, however, incur a cost (as all GPU’s with Early-Z optimizations do).

    If you would like to know more about the PowerVR graphics architecture, I would recommend reading our “PowerVR Series 5 Architecture Guide for Developers” document (available in our SDK and online here).

    The number of textures you can use depends on the graphics API you are using and the underlying hardware’s capabilities. In OpenGL ES 2.0, you can query the maximum number of supported texture image units for a fragment shader with glGetIntegerv & GL_MAX_TEXTURE_IMAGE_UNITS. The default number of texture units per fragment shader in OpenGL ES 2.0 is 8.

    If so layering the textures can best be done on the GPU or CPU?

    If you’re frequently changing the layered textures, the GPU will be best. If you’re only layering the textures once and reusing the results, rendering with the GPU to an FBO texture attachment should be most efficient.

    Joe

    #38766

    Diorama
    Member

    Thank you Joe.

    I’m a 3d modeler/texturer, but no programmer, and make use of UDK 4.
    However the information in welcome for referencing with other sources.

    So for newer iDevices I could well just make lots and lots of meshes with Alpha blended textures for gras?
    Instead of a landscape with grass texturen on the faces, translated and transformed to vertical world axis as opposed to that of the landscape mesh to give a feel as if the gras is standing up?

    Thank you 🙂

    #38767

    Joe Davis
    Member

    Hi,

    Sorry for not responding sooner.

    You should be able to render many meshes with alpha blending and achieve decent performance. I would recommend referring to Epic’s documentation and using their forums to find the most optimal way to render the scene in UE4.

    On iOS, you can use the Xcode OpenGL ES profiling tools to understand the performance of the device’s GPU when rendering your scene. If you haven’t tried their tools yet, I would recommend reading this page

    On Android and Linux PowerVR devices (if you’re targeting those), you can use our PVRTune GPU performance analysis tool.

    #38768

    Diorama
    Member

    np

    Thank you for the information, I will have a look at it.

Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic.