How to make 4BPP RGB encoding w/ PVRTexTool?

Using the PVRTexTool, how do you make a PVR texture encoded to use ePVRTPF_PVRTCI_4bpp_RGB? I can easily make ePVRTPF_PVRTCI_4bpp_RGBA, but I can’t seem to find the correct options to generate RGB only.

I’ve just came across the same thing trying to automate some conversion tasks with the command line tool.



My theory is that they are the exact same thing, and not having the option exposed in the GUI would support that.



Would love to know what the differences between the two options (if any) are.



Thanks,

Willem

Hi Deep,



There’s actually no difference between the two, the RGB is just a promise that there’s definitely no alpha in the data. If you compress to ePVRTPF_PVRTCI_4bpp_RGBA, but your texture is fully opaque, then the data doesn’t store alpha values and uses all the bit data available to encode RGB colours.



To answer your question more directly - currently there is no way of specifying this, as there are other ways of specifying that there’s no alpha in the data. As long as you don’t enable blending, it shouldn’t make a difference to your render - but I do plan to look into automatically checking this in future by parsing the data for transparency.



Thanks,

Tobias

Tobias,



Thanks for the answer.



However, the use of blending is actually the issue. In our rendering engine, we use the presence of non-binary (not 0 or 1) alpha to determine whether blending should be enabled. For PVR textures, the only way I can know at run time whether or not to enable blending is by checking the pixel format. If the format is always RGBA, then blending will be enabled all the time, thus decreasing performance.

Hi Deep,



I just realised - are you using the GUI, Library or Command Line? Only the GUI has this limitation at present. I added “PVRTC1_2_RGB” and “PVRTC1_4_RGB” for the command line to do this. Will this be enough for you for now?



Willem - I think I answered your question? I actually started writing before you posted, so never saw your question, but hopefully I’ve already provided enough information? Let me know if you have further questions.



Thanks,

Tobias

Yes, I was using the GUI. Using the command line version is a viable option for me. Thanks.