Hi Zach,

The highest quality solution would be to use the occlusion querry
extension which will return how many pixels of an object are rendered.
This does require a round trip to the graphics hardware though so
could be slow as you'll have to wait for the graphics pipeline to be
flushed through before you can get your results.

Using CPU based intersection tests would probably be faster as long as
you don't have too complex geometry and too many segment tests, I'm
very surprised that you are seeing a performance hit of down to 5 Hz
with doing this - the drive manipulator does a number of tests and
doesn't typically break frame.

I'd recommend having a look at the timing of your intersections to see
what might be causing it to be so slow.

Robert.

On 12/10/06, Zach Deedler <[EMAIL PROTECTED]> wrote:
Hello,

PROBLEM
I want to change the size of the sun's glare dependent on if it is occluded.

INVESTIGATION
I implemented this using the computeIntersections function.
I convert the sun's 3D coordinates to screen coordinates.
I check for about 6 intersections with various points on the sun.
This affects performance by about 5Hz.
Checking for 1 intersection still affects frame rate greatly.

QUESTION
1) Anybody have ideas how to make this more efficient?
2) Would the LineOfSight class be better to use?
3) Would using the depth or stencil buffers be better?  If so, how do I
query the depth buffer?

Thanks.

Zach

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to