Skip to content
This repository has been archived by the owner on Nov 27, 2018. It is now read-only.

BC1/BC3 Loading Fail #29

Open
Ryder25 opened this issue Aug 1, 2017 · 3 comments
Open

BC1/BC3 Loading Fail #29

Ryder25 opened this issue Aug 1, 2017 · 3 comments

Comments

@Ryder25
Copy link

Ryder25 commented Aug 1, 2017

Loading BC1/BC3 based DX10 formats either errors out, or shows incorrectly when doing preview.

I believe this has to do with setting the wrong BlockEncoder/Decoder for the format details. Also might want to make sure the blocksize is correct for BC1. (8 instead of 16)

I have attached 2 textures. One is dxt1_srgb (BC1_unorm_srgb) and the other is dxt5_srgb (BC3_unorm_srgb).

BC1 BC3 Textures.zip

@KFreon
Copy link
Owner

KFreon commented Aug 1, 2017

At present, I haven't properly implemented DX10 stuff, because I didn't need it.
There's so many DX10 formats, so I was hoping I'd find time to figure out how to get DirectX to do the work for me.
That said, BC1-5 should be simple enough since the decoders/encoders are the same as DX9.
No timeframe on this fix though, sorry.

Also FYI (without checking), it's to do with the length of the header. DX9 = 128, DX10 = 148 (or something like that).

@Ryder25
Copy link
Author

Ryder25 commented Aug 2, 2017

I ended up attempting to fix this myself. I have attached the file in case it will help you. Hopefully I didn't miss anything. This doesn't account for getting the proper colors for srgb based formats.

ImageEngineFormatDetails.zip

@KFreon
Copy link
Owner

KFreon commented Aug 2, 2017

Thanks, hope it works for you.
I'll take a look, although I plan on rewriting the underlying system that handles formats. It's difficult to add a new one, and it shouldn't be.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants