My question is about GPU clipmaps, a terrain rendering method presented in the GPU Clipmaps (GPU Gems 2) paper.
I've managed to load and update the heightmap and handle terrain transitions (blending between a coarse and a fine level). The normal map generation seems to work fine everywhere except for the clipmap level borders. There you can see a terrible texture/lighting seam.
I think that the GPU clipmaps are a popular rendering method. It seems that at least several people here have successfully implemented it. I hope someone could give me a clue how to get rid of this normal map error.
I'm using the original implementation ComputeNormals.fx presented here. The uniform variables are initialized as follows:
uniform float Size = 128; // clipmap resolution uniform float OneOverSize = 1 / 128; uniform float2 Viewport = float2(128,128); // I update the entire texture uniform float2 ToroidalOrigin = float2(0,0); // no shift has been made yet uniform float2 TextureOffset = float2(0.25,0.25); // fine level position relative to the coarse ring origin // EDIT: //uniform float2 ScaleFac = float2(-0.5/127,-0.5/127); // -0.5 divided by the step length uniform float2 ScaleFac = float2(-0.5/2^L,-0.5/2^L); // L is the clipmap index increasing for the LODs that are farther away // 4 LODs are rendered, L=0 for the closest LOD, L=3 for the farthest LODHere are some screenshots showíng the wireframe mode and the transition regions. I'm willing to provide further information when necessary.