-
Notifications
You must be signed in to change notification settings - Fork 449
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
D3DFMT_X8L8V8U8 support (BumpDuDv/BumpLuminance) #485
Comments
Do you have an example What format would you expect BumpDuDv and BumpLuminance files to load as? Luminance would normally be loaded as a monochromatic format. The main problem is that in Direct3D 9 these are mixes of unsigned and signed channels, so they really don't work with any DXGI format like that.
CTX1 is a proprietary compression so I don't believe details on it are public. Note that |
Here are some examples (I could provide more if needed) As for loading - I have seen NVIDIA's Texture Tool loading them correctly as RGBA, with alpha channel being 1. Maybe it can function similarly, but I am not knowledgable enough on this topic. I could provide screenshots on what the bumpmaps look like from their tool |
Another option is to convert The same "x2 biased" trick could be applied to Now I just need to find test assets for all three formats. Your test case covers |
The DirectX SDK 8.1 sample "BumpEarth" used this code to generate the three flavors. I need to see if I can write a little test app to generate DDS Files for these three:
The input texture was |
I remember that the Legacy DirectX Texture Tool can create such files (or at least can convert to bumpmap formats). Maybe that can be used to generate other samples? |
The LVU888 and LVU565 do not end up with the same image in DXTex's visualization and through DirectXTex BMP output. It looks like legacy DXTex is doing something to map one of those channels to alpha, which makes it look a lot different. I don't think that is a logical mapping of the channels, so I'm happy with the DirectXTex output (using the same kind of conversion math as the UVW case above where the alpha channel is set to 1.0): |
Thanks you! |
Hello! I am working on a texture converter, which extracts texture data from proprietary game files to DDS, and vice versa.
The project is built with Avalonia UI, so I am using a wrapper of DirectXTex. Additionally, I have an image previewer in order for users to preview the textures they are converting.
The way the previewer works is to load the image using DirectXTex, convert it to raw pixel data and encode it in PNG format, because Avalonia's UI Image control only loads PNG files.
That worked great, until recently, I stumbled upon older textures using D3DFMT_X8L8V8U8, which is not supported by the library. Encoding is not really a priority, since noone will edit these types of textures (and there are alternative ways to create bumpmaps for those games), but being able to preview them would be nice.
One additional side question: Is there any more information regarding textures using the CTX1 (Xbox 360) compression? There's very limited material available, I am curious about it
Thanks
The text was updated successfully, but these errors were encountered: