PDA

View Full Version : texture offscreen blending



ilsvm
07-31-2003, 07:59 AM
Hi there,

Is it possible to blend two textures offscreen (to a buffer different to color buffer) and then apply the result to a polygon? How? Mind you, I am using OpenGl 1.1 and don't have any multitexturing capabilities.

Thanks,

Kostas.

Rog
07-31-2003, 10:47 AM
Do you really need to do this offscreen?

You can simulate multitextures with multiple passes. For example,

First pass -
Bind texture and render polygon

Second pass -
Enable blending
Disable depth buffer writing
Bind second texture and render polygon

Does this help?

ilsvm
07-31-2003, 10:38 PM
I have tried that already. The problem is that I have two textures with transparent portions and I would like to modulate them before I apply them to the polygon in order to maintain the transparent regions (I don't want the transparent regions to be covered by the other textures.) On the other hand I can't apply alpha testing since it takes place BEFORE the blending.

Any ideas?