locked
Transparency Weirdness

    Question

  • My app uses SurfaceImageSource objects whose content is rendered via a pixel shader. The SurfaceImageSource objects are designed to include transparent regions. I have noticed that when the pixel shader returns a pixel color with the alpha value set to zero the displayed color is not necessarily transparent. If the alpha channel value is zero then the displayed color is mostly transparent only if the RGB channel values indicate a dark color. Light colored RGB values will appear mostly opaque even when the alpha channel is zero.

    Can some one enlighten me on why the transparency of a color returned by a pixel shader is affected by the RGB channel values? I can probably compensate for this by multiplying the RGB channels by the alpha channel, but is there a way to disable this behavior?
    Tuesday, October 16, 2012 7:44 PM

Answers