> De: Renk Thorsten > > > To be safe you need to limit yourself to 32 float varyings. > > Note: a vec3 counts as 3 float varyings, a vec4 as 4 etc. > > Okay thanks, then I am safe. Btw (spotted this while checking) - is > there any particular reason to compute a normal from gl_Normal in > the vertex shader, use a full varying vec3 to pass it to the > fragment shader and add noise there? I mean, this is a water > surface, it ought to be flat up to tiny corrections before adding > noise...
Apart that the earth is a sphere and ocean tiles are large pieces of terrain where the curvature is quite apparent, how whould you define flat ? In which reference frame ? The simplest way is to think that before applying normal mapping and noise perturbation, the surface of things is perpendicular to its the normal. Emilian can testify that the current water shader is extremely difficult to convert to Rembrandt because it doesn't have a clear reference frame. It seems to work in object space but with assumptions on the object-to-world transformation. My gut feeling is that it was originally a demo from another project and added to FG without much thought, and a lot of trials and errors. As the writer of the urban shader, I am thinking of rewriting the Rembrandt version of the water shader in the same spirit. Regards, -Fred ------------------------------------------------------------------------------ For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel