View Full Version : There can be only one
04-11-2001, 07:45 PM
i was wondering if there is a blend function that would eliminate a certian color within a function. Is that at all possible with opengl? thanks for you help
04-11-2001, 09:23 PM
You didn't say if you wanted to have the source color masked or the destination color masked, or both so I will tell you this much-
You can perform blending ops with a Source multiplier as the Destinations color, or vice-versa. I suppose if you made your source a Red material for example, you could use it as a Destination multiplier and that would remove the Green/Blue components from your destination. Something along these lines-
*** Draw object ***
This would filter the Destination(what is already drawn) by the Source(Object drawn) by the Color of the source.
You can also use-
This would have the inverse effect. Where Red is fully bright it would be removed.
If you are looking to simply filter the colors being drawn, you may wish to use-
This will enable you to filter certain colors from being written to the color buffer, but be aware, this causes a big performance hit. http://www.opengl.org/discussion_boards/ubb/smile.gif
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.