On Mon, Jan 16, 2012 at 10:40 AM, Thorsten Renk wrote: >> This behaviour is hardcoded, as there needs to be a default fallback >> effect/shader when none is specified in the model and shaders are turned >> on. > > Yes, I know that - but can you somehow catch that it's a cockpit you're > loading rather than a scene model and hard-code that pointing to a > different default effect file?
I don't think you want to be changing the behaviour for all cockpits, just the one that is your aircraft. For other aircraft (AI/MP), you want them to fade etc. just like the scenery and the rest of the aircraft model. So, I think you can constrain what you want to do to objects that are very close to the viewer. That's mainly (but not exclusively) your aircraft cockpit. IIRC we have two separate cameras, one for 0.0 to ~2m and another from 2m to the visibility range. Perhaps it might be possible to use a different default effect for objects using the near camera? or pass in a Uniform indicating which camera is rendering the object. Alternatively, are you not already determining the distance of the object from the viewer? Can you now simply put an if() test around this, or are there fragment shader implications as well? -Stuart ------------------------------------------------------------------------------ RSA(R) Conference 2012 Mar 27 - Feb 2 Save $400 by Jan. 27 Register now! http://p.sf.net/sfu/rsa-sfdev2dev2 _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel