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?
automatic generation of mips (min operator) dx11
Started by rouncer, Dec 11 2012 12:33 PM
4 replies to this topic
#1
Posted 11 December 2012 - 12:33 PM
you used to be able to fit a game on a disk, then you used to be able to fit a game on a cd, then you used to be able to fit a game on a dvd, now you can barely fit one on your harddrive.
#2
Posted 11 December 2012 - 07:06 PM
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.
reedbeta.com - developer blog, OpenGL demos, and other projects
#3
Posted 11 December 2012 - 08:34 PM
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...)
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...)
you used to be able to fit a game on a disk, then you used to be able to fit a game on a cd, then you used to be able to fit a game on a dvd, now you can barely fit one on your harddrive.
#4
Posted 11 December 2012 - 08:40 PM
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.
reedbeta.com - developer blog, OpenGL demos, and other projects
#5
Posted 12 December 2012 - 09:24 AM
got it, wasnt that hard. thankyou kindly.
you used to be able to fit a game on a disk, then you used to be able to fit a game on a cd, then you used to be able to fit a game on a dvd, now you can barely fit one on your harddrive.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












