-
Notifications
You must be signed in to change notification settings - Fork 2k
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
pvrtc alpha decode bug #792
Comments
Are you using PVRTexTool? Also can you try with this texture: |
I think I found the solution. It seems the punchtrough value was incorrect. And the change (ea67fa4) at this line (https://github.com/bkaradzic/bgfx/blob/master/src/image.cpp#L2115) should be reverted. I compared multiple image with this fix. I have only found slight intensity differences. In rgb it is hardly noticable, In alpha it is more visible. It seems like the rounding or something like this is done differently? I have attached the result of conversion from ptc1a -> rgba8 with pvrtextool and bgfx. |
I have a problem when using pvrtc decompression in bgfx. When I am using pvrtc textures with gles2 extension the texture alpha looks fine, but when it is decompressed with decodeBlockPtc14A it is wrong.
RGB channels are ok.
See attached image:
The right picture shows my attempt to fix it with modifying
https://github.com/bkaradzic/bgfx/blob/master/src/image.cpp#L2250
and https://github.com/bkaradzic/bgfx/blob/master/src/image.cpp#L2268 to
*_a += 255 * _factor;
The results seems better but far from perfect...
Here is our pvr with alpha. ( the images above only shows a circle/star part of the whole decal)
decals.zip
The text was updated successfully, but these errors were encountered: