> De: thorsten i renk
> 
> > 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.
> 
> Okay, that looks sort of doable - I'll have a try.
> 
> How does the parameter section at the beginning of the file change
> then?
> Simply declare all parameters which any of the techniques listed
> later might use?
> 
> And what do the different passes do?

You don't have to create a parameter for the properties you want to test
in the predicate. But you're right, all the parameters of all pass of 
all techniques of an effect need to be declared in a single section.

A pass is a state set: all the OpenGl attribute of the geometry. When 
you declare multiple pass, it's because you want the same geometry be 
drawn several times. You may want to initialize the stencil buffer 
in one pass (you don't need material properties then) and then draw
the object with the stencil test enabled. If you play with the 
render bins and the draw order that are settable in each pass you 
can achieve effect such as the light cone (pre - Rembrandt)

Regards,
-Fred

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to