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

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?

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

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 :slight_smile:

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.

np



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