> I haven't really been following this thread closely... are the > "tracers" basically occludes? Are they completely opaque?
Yes, they're completely opaque. That's tracer.frag - if it gets a white gl_Color from the vertex shader, it's a real cloud and the fragment is dropped, if it gets any other color the pixel is that of a tracer it produces an opaque white pixel: void main(void) { if (gl_Color == vec4(1.0, 1.0, 1.0, 1.0)) // this is a real cloud {discard;} gl_FragColor = vec4 (1.0, 1.0, 1.0, 1.0); } 'occluders' would perhaps be a more intuitive name then... > One possible optimization for the cloud rendering would be to use > polygons that closely follow the outline of the sprite instead of > quads; this saves on fill costs. The tracer/occluder is supposed to deal with the whole cloud, not any individual sprite (individual sprites may be just a bit transparent even in the center, but a collection of 20 of them is no longer, and in any case doing it on a per-sprite basis means 20 times the load for the vertex shader). We don't know the shape of the cloud before we create them, and to generate a polygon representing in detail the opaque part of the final cloud which is a collection of sprites with varying transparency and looks different from various positions is something which sounds highly non-trivial to me. The tracer is just the simplest guess occluding part of the opaque core of the cloud. It doesn't need to be hugely efficient on an individual cloud, because there'll be hundreds of them in a row, so even if we get only 20 % of any individual cloud, the end result is that we get opaque everywhere after 10 clouds rather than doing a row of 200 everywhere. > Also, I'm pretty sure you don't want two-sided lighting for the tracers. Okay - I'll switch this off then. But that can't explain the depth buffer issue, can it? * Thorsten ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_sfd2d_oct _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel