> > Do you mean that v1.1 as posted on the forum can't be committed > > as is to git ? > > Technically it could, but at the expense of forcing everyone to use > lightfield shaders. It overwrites for instance the default terrain > and model shaders. > > The reason why this is implemented in that way is that I have no clue > how an effect file should be properly structured. I can change an > existing effect file to insert new property-to-unifrom mappings, I > can change the filename of the shader to be used, but my attempts > to do more have so far gone terribly wrong and broken the effect. > > So what needs to be done for a clean commit is: > > * rename the special shader files where they overlap with default > files > * add conditionals to the effect files that if skydome scattering > shader is on the lightfield files should be used, otherwise the > defaults as they are (* not essential, but currently true camera > altitude above MSL is obtained from Nasal and written into the > tree - I'm fairly sure we have it somewhere better, I just don't > know where) > > It's not much work, but it requires some better knowledge of how > effect files work. Which is the point where I need help.
I think that you have to add new techniques (an XML element) to existing effect file. You leave the current <technique> intact and copy/paste it in the same file, add or change what is needed and Modify its predicate. Look at model-default.eff that implements 2 techniques. Techniques can have a predicate that can test a property. Yesterday, I implemented the <not> operator that was creating syntax errors until then. Techniques (with their predicate) are tested in ascending order of their index (the "n" attribute), so you can create a new technique with a lower index than the one for the current technique and add a predicate that test (for example) /sim/rendering/lightfield. Regards, -Fred ------------------------------------------------------------------------------ Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2 _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel