rouncer at December 11th, 2012 07:33 — #1
In direct x 11, how do you tell the computer you want to build mips with a min operator instead of an average?
I looked on google, and in the sdk help, but I couldnt find anything except a filter setting you could pick in d3dx11createshaderresourceview.
It doesnt seem to even exist... but in this quadtree displacement mapping thing I looked up, it has it, I wonder if it was for dx9?
reedbeta at December 11th, 2012 14:06 — #2
I don't think you can do that with the automatic mip generation. You would have to generate the mips yourself, with your own shader to do the min filter.
rouncer at December 11th, 2012 15:34 — #3
Thanks for reply.
I was afraid of that, I actually attempted it with sorry results, got any tips for when I go do it again? (sampler settings, general idea...)
reedbeta at December 11th, 2012 15:40 — #4
Downsample from each mip to the next lower-res one, so you're always going by a factor of 2. Then it's easy; you just do a full-screen pass, and in the pixel shader you sample with a half-texel offset to the upper left, upper right, lower left, lower right. (Half a texel of the source texture, quarter of a texel of the destination.) Use nearest-neighbor sampling too.
rouncer at December 12th, 2012 04:24 — #5
got it, wasnt that hard. thankyou kindly.