Skip to content
Snippets Groups Projects
Commit 944ee020 authored by Ken Martin's avatar Ken Martin
Browse files

A number of transparency related issues fixed

A few good fixes in here that are all related. The biggest is a
fix to OpenGLActor to use the more comprehensive GetIsOpaque
method in determining if an actor is opaque. The old code only
looked at the property's opacity. This is why you would see folks
setting somethings opacity to 0.99 to get it treated as translucent
because the actor code wasn't handling it correctly. This change
resulted in 3 new valid images for tests that were rendering
translucent items as if they were opaque. I removed these tests
from the old backend as I did not want to change the behavior
for that backend.

Next up is depth peeling. OpenGL2 depth peeling would render
a number of peels up to the limit and then just stop. Any geometry
left between the opaque layer and the last translucent layer was
just thrown out.  This created very noticable artifacts and was bad.
This change makes it so that when it gets to the last pass, it will
render all remaining geometry using alpha blending. This is much
better. Fix example if you get the limit to 20 layers and 20 was
not enough to render all the geometry, this change renders 19
layers using depth peeling, then in the 20th render it would add
in all the remaining geometry as last layer. That last layer may
have overlapping geometry which is rendered using alpha blending.

Finally some changes to the PointGaussianMapper. It turns out that
the point gaussian mapper is an translucent mapper which means it
needs the first change, and it is a very tough case for depth peeling
resulting in the second change. While at it I modified this mapper
to render far fewer fragments, resulting is far fewer overlapping
layers and fewer artifacts. Really when using PointGaussian you
should turn off depthpeeling as it is not needed and actually makes
it worse, but these changes will make it better if you happen to have
it on.  Also cleaned up the mapper so that the radius is equal to
the standard devisation of the gaussian, previously it was four
standard deviations.

Change-Id: I62d90b6e424ac0e939033387ed10ba8caac66095
parent 0c29a735
No related branches found
No related tags found
No related merge requests found
Showing
with 109 additions and 58 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment