On Tuesday 19 June 2012 12:29:34 Renk Thorsten wrote: > > There is a simple solution to that. Move the work in the fragment > > shader. You > > won't be scene complexity bound, and you'll also have the correct depth > > available as (...) > > Right... but I need the projection of the vertex position into the sun > direction in the horizon plane to compute light - that's the part which > doesn't go easily into the fragment shader. Maybe we have enough varying to > pass all raw vectors involved right through the vertex shader - then > everything can be done in the fragment part? > > The problem might also be that similar to clouds, tree textures are > transparent in places, and so the fragment part may be slower than expected > (for clouds, moving too much into the fragment shader gets very slow for > that reason). > > Thanks for the suggestion in any case - plenty of things need to be tried... > > * Thorsten
Just look in the tree shader, there's a line there dropping the fragment if it hits the transparent part, so no there won't be any penalty incurred for the transparent bits in the trees. You can have the position, properly interpolated, in the fragment shader. You already have it in most shaders. And if you don't you just replace the current varying holding the result of your work in the vertex shader with a varying passing the position/ecPosition depending on what you need. Regards, Emilian ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel