Flubberducky / gimp-dds

Automatically exported from code.google.com/p/gimp-dds
Other
0 stars 0 forks source link

Saving L8A8/L8 as DX10, fails to load result #32

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a image with two layers of the same size
2. Save the DDS with options:
Compression: None
Format: L8A8 or L8
Save: As texture array
Mipmaps: No Mipmaps
3. Close image
4. Try to load image: Unknown DXGI format: Expect problems...

What is the expected output? What do you see instead?
Image loaded correct

What version of the product are you using? On what operating system?
3.0.1 (I think) on Windows

Please provide any additional information below.
When GIMP DDS saves in DX10 (fourCC) format, the pixel format (DDS_PIXELFORMAT) 
is empty.

I'm unsure about the specs. But, if you filled out the pixel format when 
DXGI_FORMAT is set to DXGI_FORMAT_UNKNOWN, it would still be possible to load 
the image correct.

As I said, I'm not sure it's the "right"/"correct" think to do - but, it may be 
worth considering...

Thank you for this great piece of software! :)

Original issue reported on code.google.com by nikla...@gmail.com on 10 Feb 2014 at 11:34

GoogleCodeExporter commented 9 years ago
Thanks for the report!  The pixel format is indeed saved in the DDS_PIXELFORMAT 
header with DX10 images by the plugin.  The problem is, for the sake of reading 
images that were created elsewhere, I can't depend on it.  So when a DX10 image 
is detected, the plugin has to determine the pixel format using the DXGI format 
alone.  A8 works fine for me (DXGI_FORMAT_A8_UNORM), but L8A8 does not.  The 
image is read fine, but the annoying error message is displayed anyways.  This 
is because L8A8 has no compatible DXGI format that I am aware of.  I am working 
on a fix for this.  It could be considered a bonus feature, as any other DX10 
DDS image authoring software should not have L8A8 as a supported format! :)  
There are a few other formats that the plugin supports that will cause this 
problem as well.  Thanks again for the bug report!

Original comment by ski...@gmail.com on 12 Feb 2014 at 10:41

GoogleCodeExporter commented 9 years ago
Thank you for your reply. I guess, I was wrong.
Sorry for wasting your time.

Original comment by nikla...@gmail.com on 12 Feb 2014 at 11:16

GoogleCodeExporter commented 9 years ago
Not a waste of my time!  It's a very valid bug report.  Thank you for bringing 
it to my attention.  I could let the plugin detect the pixel format for unknown 
DXGI formats like you suggested, but that would be against the DDS standards.  
I can have a working fix rather quick for that.  A more correct fix would 
probably be to not allow saving DX10 format images with incompatible pixel 
formats.  A compatible DXGI format would be the R8G8 format, and you use a 
shader to sample the texture as RRRG, which would effectively give you L8A8.

Original comment by ski...@gmail.com on 12 Feb 2014 at 11:43