On Thu, Jul 19, 2012 at 6:09 PM, James Turner <zakal...@mac.com> wrote:
>
> On 19 Jul 2012, at 14:32, Tim Moore wrote:
>
>>> Do we really not run the terrain fragment shader when the terrain is seen 
>>> through the cockpit floor (my system seems to slow down even though no 
>>> terrain is seen in the event and the framerate responds to my shader 
>>> quality settings)?
>>
>> That would be nice, but the near/far camera defeats that optimization :(
>
> Which is very unfortunate, since in the common case it would allow a huge 
> amount of tile/terrain pixels to be dumped. Could we use a buffer copying to 
> trick to initialise a stencil plane on the far camera based on the 
> near-camera Z-buffer?
>
> I've no idea what the penalty of a z-buffer read and stencil buffer write on 
> the two camera would look like, but my impression is 'out of the window' 
> pixels are waaaay more expensive in terms of shaders and fog / distance 
> effects than in-cockpit pixels.

We could use the stencil buffer without copying anything: render the
near scene first, setting stencil bits, then enable the stencil test
for the far scene. I believe that the stencil test has been extremely
fast for years.
...
>>
>> The depth-pass-only pass is a well known optimization, but the fact it
>> is not helping implies that our bottleneck is not in fragment
>> processing. I've suspected for years that it lies on the CPU, and have
>> been trying to optimize our scene graph a bit...
>
> I have some plans in that direction post 2.8, especially to flatten the LOD 
> quadtrees and transforms of the tiles. Each tile will get some top-level LOD 
> groups for all objects (shared and static). I'm hoping in combination with 
> the LOD-scale function in OSG, this will mean we can automatically drop 
> random tress / building  and STG objects to keep frame-rate up. (as an 
> optional mode of course!)

Good plan. The trick is to minimize the number of LOD nodes introduced
into the scene graph while avoiding popping effects.

Tim

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to