Chris -- Yes, you're right on the skydome and clearing. At my previous
employer, we used to just draw a single fullscreen quad. and we used the
texture matrix to stretch the cloud texture map according to "distance" and
also to orient and move the texture in response to changes in the camera
orientation. But the geometry was all eye coordinates.

(OK, that was a tangent...) Like you said, we didn't bother to do a clear
before rendering the skydome, we just drew the quad at the far plane with
depth test set to ALWAYS, and the net effect was that the rendering
"cleared" both the depth and color buffers and prepared it for our app to
render the rest of the scene with a nice tight far/near ratio.

Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com
+1 303 859 9466

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Chris
'Xenon' Hanson
Sent: Tuesday, April 21, 2009 1:43 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Geometry considered in near+far planeauto
computation

Paul Martz wrote:
> Seems like you could do something similar with your skydome. Use a 
> camera to render the skydome, then a second camera to render 
> everything else in your scene.

  Maybe I'm missing something, but usually a skydome doesn't need
z-buffering at all.
Backface culling is sufficient for when you're inside a tessellated sphere,
so you can just clear the z-buffer, turn off Z writes/compares, render the
skydome, turn on z-write/compare and render the actual scene.

  Am I overlooking something? This has always worked for me.

  Concerning the huge-world-with-near-objects z-fighting problem, yeah, I've
always fought with that issue. I've thought about looking at some way to
mess with the z-write in a fragment shader so that it scales the z-distance
according to some rule other than the
(exponential?) one it uses now. That way you could have very near clip
planes without wasting all of your z precision up front.

  But I've never tried implementing it, and I don't know if the programmable
pipeline would let me get away with it.

> Paul Martz
> Skew Matrix Software LLC
> http://www.skew-matrix.com
> +1 303 859 9466

-- 
Chris 'Xenon' Hanson, omo sanza lettere                  Xenon
AlphaPixel.com
PixelSense Landsat processing now available!
http://www.alphapixel.com/demos/ "There is no Truth. There is only
Perception. To Perceive is to Exist." - Xen
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
  • [osg-use... Jean-Sébastien Guay
    • Re:... Cole, Charles E. (LARC-B702)[RAYTHEON TECHNICAL SERVICES COMPANY]
      • ... Jean-Sébastien Guay
        • ... Robert Osfield
          • ... Jean-Sébastien Guay
          • ... Jean-Sébastien Guay
            • ... Chris 'Xenon' Hanson
    • Re:... Paul Martz
      • ... Chris 'Xenon' Hanson
        • ... Paul Martz
        • ... Jean-Sébastien Guay
          • ... Chris 'Xenon' Hanson
            • ... Chris 'Xenon' Hanson
              • ... Jean-Sébastien Guay
                • ... Chris 'Xenon' Hanson
                • ... Jean-Sébastien Guay
                • ... Chris 'Xenon' Hanson
                • ... Jean-Sébastien Guay
                • ... Jean-Sébastien Guay
                • ... Chris 'Xenon' Hanson

Reply via email to