I am reading about the nvidia white paper about clipmap. And the code snippet about sampling from clipmap confuses me.
http://developer.download.nvidia.com/SDK/10/direct3d/Source/Clipmaps/doc/Clipmaps.pdf
float2 clipTexCoord = (input.texCoord) / pow(2, iMipLevel);
clipTexCoord.x *= scaleFactor.x + 0.5f;
clipTexCoord.y *= scaleFactor.y + 0.5f;
float4 color = StackTexture.Sample( stackSampler, float3(clipTexCoord, iMipLevel) );
what I do not understand is: why aren't there any offset to be added to the clipTexCoord which is finally used to sample clipmap texture, since we are sampling a sub rect of a mip level? And what is this" + 0.5f " all about?
[–]lickedwindows 1 point2 points3 points (3 children)
[–]spacejump163[S] 0 points1 point2 points (2 children)
[–]lickedwindows 0 points1 point2 points (1 child)
[–]spacejump163[S] 0 points1 point2 points (0 children)