Jump to content
  • Advertisement
  • entries
  • comments
  • views


Sign in to follow this  


I have a curious problem with my UVAtlas and terrain texturing demo.

I mentioned before that due to bilinear filtering that I was getting seams appearing between the charts that made up the terrain texture.

I tried to solve this using the ID3DXTextureGutterHelper API. Despite the fact that it is reasonably simple looking, I couldn't get it to do anything useful.

Consequently I implemented a "jittered" RTT solution. This gets rid of the obvious bilinear filtering errors. However it's caused some other quite subtle errors... [headshake]

Mip-Mapping screws it all up.

In the above image you can see three pink lines running across the terrain (the black/white parts are intentionally part of the texture). This is curious because, in the following image they're gone:

I've accentuated the seams by using the "creases" mode in MeshViewer as well as highlighting the orange lines using PSP. There are no pink/magenta bilinear filtering issues.

Quite quickly I realised what the issue was.

In the first image, things are "zoomed" out to such an extent that D3D is automagically picking a lower mip-level than the top one. Lower mip-levels are just a resized version of the top one. This seemingly re-introduces the bilinear filtering errors.

If, as in the second image, I zoom in sufficiently such that D3D picks the highest (normal) mip-level then the "jitter" correction I applied kicks in and there are no errors in the rendered display.

So, the obvious solution now is that instead of saving the results of my editor to a regular BMP and letting D3DX load and auto-gen the mip's, I need to get the editor to render every mip-level manually, and then save it out as a DDS. Fun.

Sign in to follow this  

1 Comment

Recommended Comments

Daym 13! Is that a good or bad thing? :D

Ive been out for a while so I dont understand (not even vaguely) this post. Its like I walked into a movie just after the middle, just passed the climax. The fact that I am also quite ignorant (Still!) does not help much.

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!