Re: ZB limits & Overlaid channels

New Message Reply Date view Thread view Subject view Author view

Steve Baker (sbaker++at++link.com)
Fri, 3 Apr 1998 15:31:19 -0600 (CST)


On Fri, 3 Apr 1998, Michael Boccara wrote:

> Hi Performers,
>
> For my space application, I have to use a very large Near/Far range : 1m/1e6km.
> I chose to superpose 2 channels, sharing all attributes except near/far and draw
> callback.
> ChanFG : N = 1m F = 10km
> ChanBG : N = 10km F = 1e6km
> Better than a long speech, my piece of code is at the end of the message.
>
> If I used only 1 channel, it would draw all the scene.
> While my 2 channels draw 2 complementary parts of the scene, using draw
> traversal masks.
> So we should have the same graphic load...
>
> BUT using 2 superposed channels is almost twice longer than using only 1 channel
> !!!
  
> 1/ Why does it take longer than using only 1 channel ?

There are quite a few reasons why it'll take longer:

* Much more CULL workload (the scene graph has to be traversed twice).
* Z buffer is cleared twice.
* (perhaps) Many more state changes since Performer will be
* (perhaps) Rendering the same material/texture properties once in the
  near channel and again in the far.
* There is (presumably) some per-channel overhead in Performer for setting
  up viewpoint and projection matrixes, clipping planes, etc.

...it's a bit suprising that it's *TWICE* as long unless your rendering is
severely CULL limited (possible - since you only have two CPU's) or has an
insane number of pfGeoState changes that are happening for pfGeoState that
appear on both far and near objects.

> 2/ What does happen in the pfDraw() function that is uselessly repeated between
> the 2 channels ?

It'll be drawing two different display lists - so that isn't (in itself) a
huge deal.

> 3/ How come can I call twice pfDraw() without any argument, into each draw
> callback, letting Performer guess that it is for 2 separate channels ?
  
It's not guessing, it knows which channel it is because it knows which
of your draw callbacks was being called.

Steve Baker (817)619-8776 (Vox/Vox-Mail)
Raytheon Systems Inc. (817)619-4028 (Fax)
Work: SBaker++at++link.com http://www.hti.com
Home: SJBaker1++at++airmail.net http://web2.airmail.net/sjbaker1

=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
            Submissions: info-performer++at++sgi.com
        Admin. requests: info-performer-request++at++sgi.com


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:57:12 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.