Joreg it is true now is a fix amount of 1 in mine but can be defined as a global variable and an be changed from patch.
I am using a Nvidia - Geforce 8600 GT (the one in the new macbook pro).
I took a look to Sanch’s one,and do similar approach but he has a dynamic displacement texture.
Well I think it is better not make mipMapping to the displacement texture and setup as a point. MipMapping it is used to scale different texures to see well when is far away (ex: texture applied to a floor).
sampler DisplaceSampler = sampler_state
{
Texture = ;
MinFilter = Point;
MagFilter = POINT;
MipFilter = POINT;
}
And also I think it is redundant multiply the texture coordinates with the texture matrix.
lookup = mul(TexCd, tTex);
One improvement can be use the displacement and multiply to the normal of the geometry. Nice for example applied to a sphere.
float displaceVal = tex2Dlod(DisplaceSampler,
float4(tex.x, tex.y, 0, 0));
float3 displacePos = vertexPos + normal * displaceVal;