> Yes, doing stuff once per vertex rather than once per pixel is faster, > but also > may lead to poor results. The more stuff you do in the vertex shader the > more > visible the mesh grid will be.
Maybe someone can really enlighten me on this point: My understanding is that * the vertex shader computes stuff for each vertex If I don't use a fragment shader (as e.g. in the 3dclouds), things like shading get a linear interpolation between vertices. * the fragment shader allows me to specify a non-linear function to interpolate between vertices If I have two points with distances d1 and d2, I can either compute fog1 = exp(-d1/vis) and fog2 = exp(-d2/vis) in the vertex shader. The result will then be a linear increase in fog from fog1 at d1 to fog2 at d2 - which is in general very wrong for large d1-d2 because the actual result is exponential and not linear. Or I can pass d1 and d2 to the fragment shader and compute the non-linear exponential there - which would give me the correct result, since a linear interpolation between d1 and d2 actually should be an exact result. So there should in fact not be any loss of accuracy when I move linear quantity computations to the vertex shader, this should only be true if I move non-linear quantities. Is this essentially correct? * Thorsten ------------------------------------------------------------------------------ The demand for IT networking professionals continues to grow, and the demand for specialized networking skills is growing even more rapidly. Take a complimentary Learning@Cisco Self-Assessment and learn about Cisco certifications, training, and career opportunities. http://p.sf.net/sfu/cisco-dev2dev _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel