Hi Thorsten, > De: "Renk Thorsten" <thorsten.i.r...@jyu.fi> > > I'm trying to understand why clouds can obscure hills and hills can > obscure clouds properly. > > My individual bits of knowledge are: > > * clouds are drawn from outside in, because they are in a depth > sorted bin, and this is why clouds obscure other clouds properly. > > * hills are not drawn from outside in but in some (unspecified) > order, but they are drawn in two passes, and the second pass has > > <depth> > <function>lequal</function> > <write-mask type="bool">false</write-mask> > </depth> > > declared which presumably does the trick of running a fragment only > if its depth is lesser or equal to the buffered value but does not > alter the depth buffer itself. There is no <depth> tag during the > first pass, so the depth buffer seems to be doing something by > default - at least write and perhaps also lequal testing? > Unfortunately README.effects does not mention the depth buffer at > all.
This is correct > Now, what I'm unsure about is the relative ordering of passes and > rendering bins. Are the two passes of render bin 1 done before > starting with render bin 2, or are first all passes 1 done for all > render bins, then the passes 2? > > Clouds have a > > <depth> > <write-mask>false</write-mask> > </depth> > > tag in their single pass, so they don't modifiy the depth buffer, but > there's also no lequal comparison specified - is this the default > behaviour? Otherwise I simply don't see why a hill can possibly > obscure clouds... Maybe the default is "less". I need to check. > Is it correct that if I want to insert any proxy for a cloud which is > able to obscure terrain (i.e. does not require the terrain > underneath to be rendered) this must go into pass 1 render bin 1 > with no specific <depth> tag? What is the meaning of render bin -1 > as specified for the first pass of terrain - should the cloud proxy > rather go in there? -1 is before 1. No special meaning. Render bin numbers don't have to be positive. > Quite in general - how is the precise ordering of the default > rendering, and what buffers are available when? > > Thanks for any light anyone can shed on this. The scene is first traversed to collect objects, see if they fit in the view frustum and put them in render bins. This stage is called the cull traversal. Then render bins are sorted by their numbers and drawn in that order. When we declare multiple passes in an effects, all objects affected by the effect are duplicated the number of passes mentioned in the effect during the cull traversal. As each pass can have a render bin clause, all these duplicates are distributed in all the render bins before the draw stage. To summarize, all objects having a pass of render bin -1 are rendered before any object having a render bin 1. If an object have two passes, it is rendered twice, once with the objects of the same render bin than the first pass, once with the objects of the same render bin than the second pass. The second pass can be rendered before the first pass if the render bin numbers are inverted (the pass number has no rendering meaning). Regards, -Fred ------------------------------------------------------------------------------ Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel