NVTT Google Code page. I wanted to contribute it back to the code base or share with the public, so I asked for the permission from the work, which I'm still waiting for.
At the end it's not hard. If you just dig around the source code, you will find a way to implement it in less than an hour. Or, just wait until I get the OK sign from my work :)
Mar 31, 2011
Mar 2, 2011
So my question was "what value should I pass if i want the 2nd highest mip." I had two educated guesses:
- texcoord = float4(u, v, 0, 1);
- texccord = float4(u, v, 0, 1 / number of total mip levels)
Unfortunately, I was not able to find any documentation on this: MSDN doesn't explain it and I couldn't find it on Google either. (my Google God status is being challenged here. :-) OMG! )
My co-worker Doctor Barrero did a quick test on Render Monkey, and the answer is 1. (the first choice, or passing simply 1 as the 4th component). Also you can deduce the same answer from D3D Sampler State, D3DSAMP_MAXMIPLEVEL, which is documented as:
D3DSAMP_MAXMIPLEVEL: level-of-detail index of largest map to use. Values range from 0 to (n - 1) where 0 is the largest. The default value is zero.By the way, this works same both on DirectX and OpenGL.