Skip to content
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

Compressed cubemap textures end up black on Android #119

Open
guygodin opened this issue Aug 19, 2018 · 1 comment
Open

Compressed cubemap textures end up black on Android #119

guygodin opened this issue Aug 19, 2018 · 1 comment
Labels
area-Graphics bug Something isn't working

Comments

@guygodin
Copy link

Bringing this issue from the old repository because it is still there. If I import a Cubemap texture (.dds in A8R8G8B8 format created with DirectX Texture Tool) then check the "Compress" option in Xenko Editor, the resulting texture will be completely black in game (I load the texture asset using Content.Load(...) and don't rely on the skybox asset). The texture format in game is correctly ETC2_RGBA_SRgb but the contents is all black with any texture quality setting (Fast, High, Best, etc.). If I don't check "Compress", it shows up correctly. If I manually compress the texture in PVRTexTool and import as a RawAsset it also works correctly (althrough the gamma is off).

@guygodin
Copy link
Author

Found the source of the problem. I have tweaked the code too much in my branch to submit a PR but essentially the issue was with mipmapped cubemaps and the TransposeFaceData call not doing the correct thing because the PixelFormatExtensions doesn’t initialize the sizeOfInBits array for the Android specific texture compressions. Solution is to initialize the array to proper values for the ETC and other compressions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Graphics bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants