Imagination PowerVR SDK Blog

How to generate signed EAC_RG11 format texture by PVRTexTool lib

pvrtextool

#1

Hi,
I want to generate EAC_RG11 signed format texture by PVRTexTool lib, but I just find ePVRTPF_EAC_RG11 flag to generate EAC_RG11 unsigned format. I have tried change the channel variable to ePVRTVarTypeSignedByteNorm. But the result is still not correct. Does anyone has any idea about this?
Thanks


#2

If you try the same conversion from PVRTexToolCLI do you have any issues? Could you attach the input texture that reproduces the issue?

If you need to, you can send anything confidentially, you can create a ticket on the support portal: pvrsupport.imgtec.com/new-ticket


#3

Hi,
I don’t use the PVRTexToolCLI to convert the image, because I want to change my normal map(RGBA32F) value range from 0~1 to -1~1 first, then convert to signed EAC_RG11 format. I have tried to convert the origin normal map( rang 0 ~ 1) to unsigned EAC_RG11 format. The result is correct, but I can’t find any method to convert to signed EAC_RG11 format. I tried to use channel type(signed byte norm), but the result also is not correct too. So does the PVRTexTool lib that can convert format to signed EAC_RG11 format?
Thanks


#4

PVRTexToolCLI and PVRTexToolLib share the same codebase so they should behave identically.

I’ve been trying the same conversion myself and I’ve not been able to reproduce the issue. Could you be more specific about the incorrect result you’re seeing?

Does setting the variable format to ‘signed integer’ make a difference?


#5

Hi,
Did you test the image that has negative value? If I use the data that has negative value I will get wrong result. The converted image will be GL_COMPRESSED_SIGNED_RG11_EAC format texture and show on the screen. I also think the variable format doesn’t have any useful for the compression data format. I will use PVRTexTool lib to save a image and check the format.
Thanks.


#6

Hi Kechi,

Did you manage to resolve this issue?

I still don’t have a reproduction for this. Could you attach your source image, and the image with file with the unexpected output?


#7

Hi,
I resolved this issue by using another ETC library. If you still want to test this issue, I can save the encoded KTX image file and original image file for you.
Thanks.


#8

Yes, that might be useful. Could you also send the image file formatted as you expected.