How to Call the Transcode() to delete alpha Channel ?

This topic contains 2 replies, has 2 voices, and was last updated by  Tobias Hector 4 years, 1 month ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #31524

    liumazi
    Member

    I called the Function “Transcode()”, set the parameter “const PixelType ptFormat” is “ePVRTPF_PVRTCI_2bpp_RGB” / “ePVRTPF_PVRTCI_2bpp_RGBA”

    But their results seem to have no difference in the “PVRTexTool”.

    In the Texture Information, Format Both are PVRTC 2bpp.

    In the Display Options -> Colour, There are alpha channel all. why also have the alpha channel when use the parameter ” ePVRTPF_PVRTCI_2bpp_RGB ” ?

    #38153

    liumazi
    Member

    My codes is :

    // want to delete alpha Channel, but Failed
    Transcode( cTexture, ePVRTPF_PVRTCI_2bpp_RGB, ePVRTVarTypeUnsignedByteNorm, ePVRTCSpacelRGB);

    // successful
    Transcode( cTexture, ePVRTPF_PVRTCI_2bpp_RGBA, ePVRTVarTypeUnsignedByteNorm, ePVRTCSpacelRGB);

    #38154

    Hi Liumazi,

    Essentially the “alpha” channel was just a hint to our older hardware to say whether alpha is likely to be present or not, but this doesn’t really make a difference any more (In the GUI, the two are no longer distinguished). If you want to empty the alpha channel you should use the “SetChannels” function, to set the float value of the alpha channel to 1.0 globally.

    However, saying that, I have had a request for this behaviour before, so I will add it for the 3.3 release of our SDK.

    Thanks,
    Tobias

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