mipmap for texColor doesn't seem to work

Post Reply
  • Author
  • Message
Offline
Posts: 14
Joined: 07 Jan 2013, 11:51

mipmap for texColor doesn't seem to work

I tried to sample texture with tex2Dlod at mip level higher than 1 (like this: res=tex2Dlod(SamplerColor, float4(IN.txcoord,0,4));) but it doesn't seem to lower the resolution. Can you confirm if it's working, or just I did something wrong please?

Offline
User avatar
*blah-blah-blah maniac*
Posts: 17545
Joined: 27 Dec 2011, 08:53
Location: Rather not to say

Re: mipmap for texColor doesn't seem to work

Mipmaps not available in external shaders (except some very old mods 0.075 f.e.) and will not be in future.
_________________
i9-9900k, 64Gb RAM, RTX 3060 12Gb, Win7

Offline
Posts: 14
Joined: 07 Jan 2013, 11:51

Re: mipmap for texColor doesn't seem to work

Ok thanks. But is it possible that you create a texture and technique for temporary data storage so that I can create a downsampled texture during a pass or calculate and store the first derivative of the image please?

Offline
User avatar
*blah-blah-blah maniac*
Posts: 17545
Joined: 27 Dec 2011, 08:53
Location: Rather not to say

Re: mipmap for texColor doesn't seem to work

This require changes in shader standart and i need at least detailed description what do you need, amount of passes, etc. If you ask about one additional render target, somebody else will ask about another 10, so i need to make right decision before implementing new "features".
_________________
i9-9900k, 64Gb RAM, RTX 3060 12Gb, Win7

Offline
Posts: 14
Joined: 07 Jan 2013, 11:51

Re: mipmap for texColor doesn't seem to work

Basically, I need one pass for downsampling the screen texture to blur it more effectively. (There are several types of blurring I want to try out. Specifically, poisson disk blur (fixed nujmber of samples), summed area table, and just a normal box blur for prepassing for anisotropic diffusion. These all requires only one pass so 1 should be enough for this.)

Code: Select all

The derivative one is for calculating second derivatives for the diffusion equation. It seems to me this way takes less sampling instructions than sampling surround texel. But since I don't really know how exactly the hardware compute the derivatives and how accurate it will be. I fear the equation may end up unstable. Also that would require as many passes as diffusion passes. Since the maximum amount of techniques allowed in the prepass fx is 8. I can only do 6 iterations for it. The other 2 is for calculating the blur diameter or so called circle of confusion. This is not really essential so you don't have to do it if you don't want to because I just want it for testing. But for the pass to downsample, that is more important because blurring a high resolution image doesn't work very well.
scrap this. I think I will try the ADI approach and instead of the finite impulse response that I'm doing, I will try to solve for separable infinite impulse response if texture storage is available but I will still need a few texels to store things like the reduced tridiagonal matrix and input texture...

Thanks

Offline
Posts: 14
Joined: 07 Jan 2013, 11:51

Re: mipmap for texColor doesn't seem to work

ENBSeries wrote:This require changes in shader standart and i need at least detailed description what do you need, amount of passes, etc. If you ask about one additional render target, somebody else will ask about another 10, so i need to make right decision before implementing new "features".
Ok now I've figured out exactly how many passes I need.

For the tridiagonal solver, I need a screensize.x*screensize.x (screen height) texture sample and a screensize.z*screensize.z (screen width) texture sample. Then I need 11 (for 1920x1080 resolution) passes for each of the sample.

For blurring downsampled texture, I need 2 pass and just one texture sample of the screen size.

For summed area table, I only need one pass and one texture sample of the screen size. (summed area table is the fastest method for doing variable area blurring so I hope you make this available as soon as possible please)


That's it.

Thank you.

Offline
User avatar
*blah-blah-blah maniac*
Posts: 17545
Joined: 27 Dec 2011, 08:53
Location: Rather not to say

Re: mipmap for texColor doesn't seem to work

Non screen size render targets require some definitions inside shaders i guess. Well, i'll try to find solution.
_________________
i9-9900k, 64Gb RAM, RTX 3060 12Gb, Win7
Post Reply