2 ms·
Also the problem can occur with any image format; what matters is how it's stored in the texture not on disc.
by tgb 9y ago
Also the problem can occur with any image format; what matters is how it's stored in the texture not on disc.
- mark-r 9y agoBut it's specifically a problem with PNG because the spec explicitly allows encoders to substitute their own RGB values for any transparent pixel. Most other formats are expected to store the values you give them without modification.
- tgb 9y agoNo, the problem discussed in the article can occur with any image format (that supports alpha) and occurs later in the pipeline so it really doesn't matter how the texture was stored on disc. Or even whether it was stored - this could happen with procedurally generated textures.
- mark-r 9y agoThe article discussed one possible workaround, which was to specify RGB values for the fully transparent pixels in the artwork. If the PNG tool you're using substitutes its own RGB values in those transparent pixels, as allowed by the spec, the workaround doesn't work. That's why PNG in particular is a problem. If you follow the recommendation at the end to use premultiplied alpha for all computations, this becomes a moot point.