I have last question, i rode this article http://www.gamedev.net/blog/73/entry-1692117-terrain-texturing-explained/ and i saw what data are save to lut texture, on U axis slope, on V axis altitude. This is good solution because i don't must refresh my lut texture when i change terrain geometry. But i don't know how i should save altitude data, range on V axis is 0-1, my heightmap vertex can have any height. How save and read this ? I should do somthing like this:
float height; float3 B = tex2D(lutsampler, float2(height / LUTTextureHeight, normal.y);Or:
float height; float3 B = tex2D(lutsampler, float2(height / MaxTerrainHeight, normal.y);I don't know how i should do this....