Closed benanil closed 8 months ago
when I transcode to raw image format cTFRGBA32 it works fine in Android, but I want to use compressed textures on android note: the file that I transcoding is sponza textures all encoded in one basis file
I appriciaded your awesome work and its awesome technology best regards
this doesn't work too
uint32_t bytesPerPixel = basis_get_bytes_per_block_or_pixel(transcoder_texture_format::cTFETC2_RGBA);
uint32_t size = (info.m_num_blocks_x * info.m_num_blocks_y) * bytesPerPixel;
bool result = transcoder.transcode_image_level(basisFile, fileSize, i, 0, outputTexture, size,
transcoder_texture_format::cTFETC2_RGBA);
glCompressedTexImage2D(GL_TEXTURE_2D, 0, GL_COMPRESSED_RGBA8_ETC2_EAC, width, height, 0, size, outputTexture);
ktx format works fine too
when I transcode to raw image format cTFRGBA32 it works fine in Android
Hi - This is a good sign. It means the transcoder is able to decompress the compressed texture data and then give you RGBA data successfully. When you transcode to cTFETC2_RGBA, can you examine the returned memory and see if it's all 0's? Or write it to disk and verify it on your desktop?
here how it looks on my phone
this is because I used ambient light and ndl
without lighting:
"can you examine the returned memory and see if it's all 0's?" mostly zero
![]()
oh no, its not...
the second image that I inspect has more bits set
note: this is metallic roughness texture, all red. is it looking correct?
here is example of normal map:
it's not full of zero
image and its binary
I couldn't find any resource about transcoding etc2 and using it using vulkan or opengl is there any project that use basis that I can take a look as reference?
this was probably because, I was using size_t on both 32bit and 64bit architectures, and when I read from disk problem was occuring, but I gived up working on this one week ago and currently using etcpak and zstd.
this code works fine on my windows pc but when I run on my android phone, textures are black I don't got any basis or opengl errors, and for a while I can't figure out why this is happenning, can you help? note: I've checked my device supports GL_COMPRESSED_RGBA8_ETC2_EAC