On Monday 16 January 2012 11:34:23 thorsten.i.r...@jyu.fi wrote:
> I've noticed recently more or less by accident and to my dismay that
> model-default.eff is used both by models placed in the scenery and by
> typical aircraft 3d cockpits.
> 
> This is rapidly looking like a bad idea when a more detailed atmosphere
> model enters the game - the terrain haze shader has altitude-differential
> fog, the sunrise/set code I'm working on has position-differential
> lighting and fog coloring.
> 
> Models placed into the scene need essentially the same shader as the
> terrain and skydome, otherwise they don't blend properly - no choice here.
> 
> However, half the visual field is typically taken by the cockpit, and the
> vertices and pixels of that don't really need to go through ~120 lines of
> differential fogging and lighting code just to discover that they get the
> default light at the position and no fog.
> 
> One could probably write some provisions into the shader to make a
> distance check first and if the model is very close not to go through all
> the motions, but it seems more reasonable to me to do this on the level of
> the effect declarations and simply feed the 3dcockpit through a different
> default effect file which never tries to do any fogging in the first
> place.
> 
> Would this be complicated to do (i.e. require changing all aircraft xmls),
> or is there an easy way to do this? I'm just testing the waters here... as
> far as I know none of the position differential shading code has been
> committed yet, but I'm sort of developing strongly into that direction,
> and I want to identify trouble as soon as possible...
> 
> * Thorsten

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.

------------------------------------------------------------------------------
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

Reply via email to