Jump to content
  • Advertisement
Sign in to follow this  
filousnt

DX10 VS fp16 mipmap filtering

This topic is 3761 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi, Currently working on gpu geometry clipmap for dx10, i store elevation data on R16F textures. For each texture, i also store coarser(level+1) elevation on mipmap level 1 to morph between levels. Texture coordinates are correct but value fetched from mipmap level 1 (Bilinear) is a bit different from the one expected for "blue dots", red dots are ok. Blue dots should be bilerp with 0.5 weight but there is sometimes inaccuracies. // tex size 64 // alpha.x = 0 on inside clipmap <=> use mipmap level 0 // alpha.x = 1 on border clipmap <=> use mipmap level 1 to morph // input.vertexToTexel.y = array index // TexPos int [0,63] half h = txClipArray.SampleLevel( samMinLinearMagMipPointWrap, float3( 1.0f/64.0f + float2(TexPos)/64.0f, input.vertexToTexel.y ), alpha.x ).r; Image Hosted by ImageShack.us red & blue dots are in mipmap level 0. Only red dots are in mipmap level 1. Image Hosted by ImageShack.us from left to right, a red dot with correct height from mipmap level 1, a blue dot with incorrect interpolation & again a correct red dot. Image Hosted by ImageShack.us

Share this post


Link to post
Share on other sites
Advertisement
I just programmed something like this and I *think* I know where the problem is.

You cannot take the coarser data from a mipmap for but have to precalculate it and but it in the fraction part of the float (like hoppe said in his paper, although there are also much better ways to handle this, though not with r16f).

The Red dots are ok because they are exactly on the same height but the blue dots are interpolated between it so you have to calculate the right average value from the surrounding (red) heights and store them for doing the transition.

The mipmap in itself is not really helping for transitions (its good for storing the data, though) unless you use complex shaders that take much much more performance and texture access and do the calculation in real-time.

Share this post


Link to post
Share on other sites
Quote:
Original post by Zaph-0
You cannot take the coarser data from a mipmap for but have to precalculate it and but it in the fraction part of the float (like hoppe said in his paper, although there are also much better ways to handle this, though not with r16f).

i am using DX10, so i don't use his compression/decompression(R32F) process which hoppes describe. i am trying some alternatives offered by DX10.

Quote:
Original post by Zaph-0
The Red dots are ok because they are exactly on the same height but the blue dots are interpolated between it so you have to calculate the right average value from the surrounding (red) heights and store them for doing the transition.

right, but bilinear filtering of the mipmap should give me the right average of the surrouding. The problem is the small inaccuracy.

Quote:
Original post by Zaph-0
The mipmap in itself is not really helping for transitions (its good for storing the data, though) unless you use complex shaders that take much much more performance and texture access and do the calculation in real-time.


less storage required, less bus traffic, free interpolation between mipmap level 0 & 1, texture cache friendly(not that much but better than original) and finally clipmap L mipmap 1 can be updated by the GPU from clipmap level L+1 mipmap 0.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!