Original Post
Hi I have a 2D uniform grid which is turned into a 3D terrain in a vertex shader by combining it with a heightmap using vertex texture fetch all working just fine I have implemented a trick where I can calculate the heights of the other two vertices in the triangle using this extra information I can calculate a vertex normal but the pixel shader lerps this and the result is not pleasant I am thinking about extending the current system to calculate the heights of 16 vertices and calculate sets of cubic coefficients to pass into the pixel shader then the pixel shader can calculate a smoothly interpolated normal this will require some significant reworking and some performance considerations I am worried that after all the effort the results will be poor Has anybody else any experience with calculating smooth normals dynamically? Maybe I am missing a trick ...
