View Full Version : Transparency - multisampling
02-02-2006, 06:55 AM
I'm looking for a method which is managing transparency whatever the order of
drawing of objects.
Could multisampling help me (GL_MULTISAMPLE_ARB) ?
If not, what could I do (excepting drawing in the right order) ?
where could I find examples ??
Thanks for your help
02-02-2006, 11:49 AM
Yes it can be used. You use the multisample API to set alpha to generate a subsample coverage mask, and it effectively becomes like a subpixel screendoor transparency. Good for order invariance for stuff like cookiecutter trees with slightly softer edges but quality is limited by number of samples.
You use SampleCoverageARB to set it to SAMPLE_ALPHA_TO_COVERAGE_ARB & voila! I haven't tried it since the API change, I used to do this on big workstations with the SGI API extension.
If you draw something more transparent behind a semi-transparent object it will not show, you should be able to invert the coverage mask for this using the available invert token. But remember the combined result will be more opaque than it should be.
02-07-2006, 11:31 PM
So you're saying that I've just to enable "GL_MULTISAMPLE_ARB" and set
"glSampleCoverageARB" to "GL_SAMPLE_ALPHA_TO_COVERAGE_ARB" or may I have to use the Stencil Buffer before ??
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.