r3dwolf

Load Compressed texture .dds .pvr

Recommended Posts

Hello,

I need to load .dds and .pvr texture (not in ktx container).

I succesfully load a dds (DXT1) RGB texture.

For DXT5 RGBA i think there is a bug in babylon.dds.ts line 140

isCompressed: (fourCC === FOURCC_DXT1 || fourCC === FOURCC_DXT3 || FOURCC_DXT1 === FOURCC_DXT5),

instead of

isCompressed: (fourCC === FOURCC_DXT1 || fourCC === FOURCC_DXT3 || fourCC === FOURCC_DXT5),

I changed that line and now i can load also DXT5.

 

For PVR file I could load them correctly on iOS up to version 10.3 , with the latest version 11 no longer works.

Has anyone already solved the problem?

Share this post


Link to post
Share on other sites

Well, for the DDS container error, you might PR the small change.

What container format are you using for pvr with BJS? The DDS container code here is not being used like a container.  It is hard coded to only deliver DXT textures.  Not even sure you could find a DDS encoder for pvr textures due to patent issues. 

I seem to recall pvr having some kind of a specific container file, but you are going to have to make many changes to BABYLON.Engine class to use those, and then your scene will only work on iOS.

I just checked my full scale test scene for ktx containers works fine on iOS 11.

Share this post


Link to post
Share on other sites

Hello @JCPalmer 

I use pvr container for pvr file.

PVR in ktx container works also for me, but I have a lot of PVR file (with PVR container) and I would like to find a way to use those instead of convert all texture files.

The curious thing is that, in ios version 10, my pvr textures files were properly seen.

Thanks for the fix for typo @Deltakosh

Share this post


Link to post
Share on other sites

Do you still have the originals (.jpg or .png)?  I wrote a couple of bat files to batch convert a whole directory of originals to all variants of .ktx files.  See doc for usage.

Someone also improved on this, converting it to a Node.js script.  This is at the bottom of doc.

If you do not have the originals, you might edit one of the scripts to read .pvr files instead of .jpg || .png as the input to the PVRTexTool.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.