PDA

View Full Version : Register combiners and blending?



StefanG
12-11-2002, 11:54 AM
I am fiddling around with NV register combiner code (yes, I know, old stuff, but I want to stay compatible with older hardware), and I have problems getting blending to work. Or even understanding how to do it.
How do I, with GL_REGISTER_COMBINERS_NV enabled, access the previously rendered framebuffer pixel color, to blend my carefully constructed combiner outputcolor into the scene? This is done in glBlend() stuff, but I can't seem to replicate that functionality using register combiners.

Coriolis
12-11-2002, 11:58 AM
You can only access the value in the frame buffer when you are ready to write a pixel. The blending that register combiners do is combining textures and vertex colors and such to come up with the color for a fragment, then this fragment color gets blended with the frame buffer.

StefanG
12-11-2002, 12:45 PM
OK, so what you are saying is that I need to do blending too, and set my glBlendFunc to get the pixel blending to work?
Register combiners seem to do some stuff that are in the regular glBlendFunc path, so I was assuming that blending and register combiners were mutually exclusive.
I guess I'm off for some testing of glEnable(GL_BLEND) and register combiner stuff all at once and see where it takes me...
Thanks for the clue!


[This message has been edited by StefanG (edited 12-11-2002).]

StefanG
12-11-2002, 04:59 PM
Got it working! Thanks.

It actually says in the docs (in small print) that the final combiner RGBA output goes on to further processing, e.g. blending, alpha and depth tests. I was really confused there.