There is a way, I think, that this could actually be done without the use of
render targets.  It requires some engine access, though, to wit:

1.  Draw the view.  If no portals are in view (done with pixelvis or whatnot),
      terminate recursion (if any).
2.  Draw portals.  The portal is drawn with a special material that clears the
     depth buffer.
3.  For each portal:
    a. find the transformed camera position looking through that portal.
    b. store off portal location info (e.g. on a global stack)
    c. cull polygons *from the exit portal location*
    d. go to step 1 *from the transformed camera location through the exit
          portal*
    e. retrieve portal location from stack, draw a transparent overlay quad on
          portal (flames, etc.)

That should make it possible to do this without render targets, including the
flame effects along the borders that we see.  Note, though, that this
requires the ability to separate the polygon cull step from the render step
in the engine, in step 3c.  Models that touch the portal will have still have
to be cloned; in fact, there's probably a shadow physics controller at
the "far" portal.  Anybody want to try prototyping this on Ogre3D?

-John Sheu

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to