# Pre-multiplied Alpha Limbo?

**URL:** <https://forums.imgtec.com/t/pre-multiplied-alpha-limbo/1425>\
**Category:** PowerVR Insider\
**Created:** [May 26, 2012, 10:52am UTC](https://forums.imgtec.com/t/pre-multiplied-alpha-limbo/1425 "2012-05-26T10:52:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![codey](https://avatars.discourse-cdn.com/v4/letter/c/ea666f/32.png) [@codey](https://forums.imgtec.com/u/codey)\
**Post date:** [May 26, 2012, 10:52am UTC](https://forums.imgtec.com/t/pre-multiplied-alpha-limbo/1425/1 "2012-05-26T10:52:10Z")

</div>

Hello!  
  
Unless I am missing  
  
something I appear to be caught in somewhat of a limbo situation on a  
  
particular issue with regards to uploading pre-multiplied alpha pvr  
  
textures into my texture system.  
  
I’m targeting the iOS platform & using the OpenGL ES 2.0 API, & specifically for this issue, loading uncompressed formats that I can embed mipmap levels into (e.g. pvr texture header version 2’s OGL\_RGBA\_4444, OGL\_RGB\_565, OGL\_RGBA\_8888, etc.).   
  
It appears that either:

- The pvr texture version 3 header, which has the premultiplied flag  
  
  
  
  
  
  
  
  
  
  
  
PVRTEX3\_PREMULTIPLIED of the flags&nbsp;  
  
  
  
  
  
  
  
  
  
  
  
u32Flags field, doesn’t support the pixel formats I need (it appears to only support compression formats currently).
- Alternatively using the pvr texture version 2 header (which has the desired OpenGL texture formats I need), it doesn’t appear to have a way to access (in code) whether the texture being loaded has pre-mulitplied alpha or not.&nbsp; 

  
How long until uncomressed formats will be added into pvr texture version 3 header’s pixel formats or am I overlooking where they are in the spec/docs?   
  
&/or is there a way to do it using the pvr texture version 2 header?  
  
Thank you.

---

<div class="post-metadata">

**Author:** ![tobias](https://avatars.discourse-cdn.com/v4/letter/t/c67d28/32.png) [@tobias](https://forums.imgtec.com/u/tobias)\
**Post date:** [May 28, 2012, 7:49am UTC](https://forums.imgtec.com/t/pre-multiplied-alpha-limbo/1425/2 "2012-05-28T07:49:25Z")

</div>

Hi Codey,  
  
The PVR3 header doesn’t define enums for uncompressed formats but actually supports a huge range of uncompressed formats through a dynamic system. There are macros in PVRTTexture.h called PVRTGENPIXELIDn (n=1 to 4). These macros will generate an uncompressed pixel identifier for you from up to 4 channel names (lower case, r,g,b,a,l,i or x) and an equivalent number of bits per channel. (e.g. PVRTGENPIXELID4(‘r’,‘g’,‘b’,‘a’,8,8,8,8)).  
  
This will generate a 64-bit identifier that is API independent. I’d suggest looking through our OpenGL ES tools code or reading up further on the PVR3 file format here:[https://www.imgtec.com/powervr/insider/docs/PVR%20File%20Format.Specification.1.0.11.External.pdf](https://www.imgtec.com/powervr/insider/docs/PVR%20File%20Format.Specification.1.0.11.External.pdf)  
  
Thanks,  
  
Tobias
