Alpha interpolation in a pixel shader
Posted
by
c4sh
on Game Development
See other posts from Game Development
or by c4sh
Published on 2013-11-13T13:23:56Z
Indexed on
2013/11/13
16:19 UTC
Read the original article
Hit count: 706
How does the interpolation in a fragment shader work when it comes to the alpha parameter?
I'm programming a shader with SharpDX, DirectX11. My idea is to interpolate 2 3d points of a segment, so that I'll have the position interpolated in between in the pixel shader. But I want to know what happens with the alpha parameter when that position is blocked by another polygon.
For instance, if alpha is 1.0 at the left end of my segment and 0.0 at the other one. What is the value of alpha in the middle, 0.5? Or does it depend on the visibility at that point (meaning it could be, for instance, 1.0 OR 0.0 depending on if that part of the segment is hidden by a poolygon?
© Game Development or respective owner