If "physically correct" is what you need then OpenGL probably isn't what you
want. In general, OpenGL is suitable for rendering something that looks
pretty good, FAST.

I don't know of any way to get fragment coverage in a shader. However, even
if you could that wouldn't be adequate:
Imagine you have a white (255) square on a black (0) background. You size
the square so that it precisely covers one pixel. When you render it, the
pixel is coloured white (255).
Now imagine you divide that white square in half. You would expect that
rendering the two halves would also get you a value of 255, but...
When you render the first half, the pixel is 255 * 0.5 + 0 * (1 - 0.5) =
127.
When you render the second half the pixel is 255 * 0.5 + 127 * (1 - 0.5) =
191. NOT 255!

Therefore, multiplying alpha by coverage wouldn't work unless you're only
dealing with separate polygons, which isn't the case most of the time.
HTH
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to