You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Other problem is that with punchthrough:
"If punch-through mode is selected, and the modulation bits for a given pixel have a value of 0b10, the alpha value of the resulting color is 0x00. This is irrespective of the presence or values of any alpha channel in the input colors."
image decoder uses s_pvrtcWeights table for weights. Outputting 0 can be implemented by settings alpha weights to 0 when punchtrough is on and modulation is 0b10.
pipes.zip
This image clearly shows the artifacts.
One problem seems to be the incorrect punchthrough flag. According to the specs (table 173) it is at bit 32.
https://www.khronos.org/registry/DataFormat/specs/1.3/dataformat.1.3.html#_format_pvrtc1_4bpp
Current values are (bc[7]&1) which is bit 56.
bimg/src/image.cpp
Line 3044 in 82738cd
bimg/src/image.cpp
Line 3152 in 82738cd
Other problem is that with punchthrough:
"If punch-through mode is selected, and the modulation bits for a given pixel have a value of 0b10, the alpha value of the resulting color is 0x00. This is irrespective of the presence or values of any alpha channel in the input colors."
image decoder uses s_pvrtcWeights table for weights. Outputting 0 can be implemented by settings alpha weights to 0 when punchtrough is on and modulation is 0b10.
bimg/src/image.cpp
Line 2969 in 82738cd
Alpha weights are the 3. and 4. values.
So this should look like
{ 4, 4, 0, 0 },
bkaradzic/bgfx#792
The text was updated successfully, but these errors were encountered: