-
-
Notifications
You must be signed in to change notification settings - Fork 960
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Grayscale textures are broken in 4.2.0.2188 #2376
Comments
Some added info this seems to have broken after 2149 as it works in that gamestudio version as expected. |
|
Weird, Are being able to reproduce this bug before my PR related to DirectXTex? #2338 |
@Doprez Could you upload tested texture here in this issue? I wonder what gone wrong that it executes DxtTextLib in the first place... |
@Jklawreszuk it is the one in the post above, probably it has a high bit format. Maybe 16, 24 or 32 bit per channel. I can confirm that this image doesn't work: Bricks |
@Jklawreszuk what was the reason to change the supported file formats in #2303? The DxtLib handled png files with esoteric pixel formats correctly. There might also be gamma/sRGB issues that are handled differently... |
It should be the image in the description, unfortunately it shows the picture instead of just a file reference but opening athat and downloading it should reproduce the issue. |
@Doprez Right, thanks! I didn't pay attention to it 🤦 DirectXTex wiki : https://github.com/microsoft/DirectXTex/wiki/WIC-I-O-Functions. So intention was to move responsibility of image loading from dxt to freeimage but I guess modifying |
Not urgent for me, but is there any progress on this issue? From what I can tell, DxtTexLib loads the images in whatever pixel format and only changes DxtTexLib would make is converting srgb/non-srgb:
eg. That 16-bit grayscale image gets loaded as a 16-bit pixel format texture. FITexLib, on the other hand would try to force the loaded image as 32-bit pixel format (BGRA_8888):
The 16-bit grayscale image above just fails to get converted (ie. returns as null data), and it basically falls apart from then on. The solution seems to be either update FITexLib to somehow retain the original pixelformat, or just revert it until someone knows how to fix it through FITexLib (not me). I haven't tested to see, but I am also concerned that |
Closed in favor of the more specific #2449 |
Release Type: Official Release
Version: 4.2.0.2188
Platform(s): Windows
Describe the bug
When importing a grayscale file into the editor it will be completely broken.
you can make it at least shows something if you uncheck all of the options in the feature panel but it just shows white noise.
This is how it looks in 4.2.0.2122:
To Reproduce
Steps to reproduce the behavior:
get a grayscale image
import it into the editor
Expected behavior
Textures should look good.
The text was updated successfully, but these errors were encountered: