May I ask yet another dumb question? In the first rendering pass of default terrain rendering, we use default.vert and terrain-nocolor.frag as shaders. I have so far mindlessly copied the first pass since I had no real clue as to what it is for. Its purpose seems to be to establish that faraway scenery is not rendered in front of nearby scenery (I think Fred called this 'initializing the z-buffer').
My question is - why do we use shaders which texture and fog the terrain at this stage? Every texture2D() statement seems to cost me ~12% of my framerate. I've experimentally replaced default.vert and terrain-nocolor.frag by trivial.vert which is just ftransform(); and trivial.frag which is just gl_FragColor = vec4 (1.0, 1.0, 1.0, 1.0);, and apart from my ~12% increase in framerate I haven't seen any bad side effects - the z-ordering of scenery looks sane, fogging, texturing and colors work normal,... So, was there a reason we texture and fog during the first pass and should I see any unexpected side effects, or can I simply use the trivial shaders and get my 12% framerate? Thanks, * Thorsten ------------------------------------------------------------------------------ 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