3
\$\begingroup\$

I have a 3D scene that I've tried rendering in Direct3D 10 and using WPF's 3D framework. Obviously, going directly to Direct3D is producing far better performance but I am getting banding which doesn't appear using the same scene in WPF.

Does anyone have any tips on removing this type of artifact? It's obviously possible because WPF doesn't have it... If you have any questions about my Direct3D setup I will be please to add that information.

WPF:

enter image description here

Direct3D:

enter image description here

\$\endgroup\$
5
  • \$\begingroup\$ That is called Aliasing, and quite a beautiful and pure example of the effect I must say. A little anti-aliasing is called for, I think. Either that or different sampling options for the source texture, if you're using point. I'm still trying to figure out why the WPF version doesn't display the artifact. \$\endgroup\$ Mar 16, 2012 at 2:40
  • \$\begingroup\$ Weird. It looks like somehow in the D3D version the mipmaps for the texture are screwed up, with the banding appearing in the first mip level past the base one. Are you generating your own mipmaps or relying on D3D and/or WPF to do it for you? If the latter, perhaps WPF is using a better-quality downsampling filter than D3D. Since your base texture looks like it has a lot of bright and dark lines I could see a poor filter giving odd results. Does the same effect happen with other textures, or just this one? \$\endgroup\$ Mar 16, 2012 at 2:47
  • \$\begingroup\$ @NathanReed good idea, it could very well be the MIPs. \$\endgroup\$ Mar 16, 2012 at 3:28
  • \$\begingroup\$ I'm relying on both D3D and WPF to generate the mipmaps for me. I will take a look at the filters, thanks for giving me something to go on - I am quite new at all this! \$\endgroup\$
    – Groky
    Mar 16, 2012 at 7:29
  • \$\begingroup\$ @NathanReed: Indeed, that was my problem - I added D3DX10_FILTER_TRIANGLE to the mip filter flags and all is now un-bandy! If you'd like to turn your comment into an answer I'd love to mark it as the answer to the question. Thank you also Patrick Hughes! \$\endgroup\$
    – Groky
    Mar 16, 2012 at 8:03

1 Answer 1

2
\$\begingroup\$

It looks like in the D3D version the mipmaps for the texture are screwed up, with the banding appearing in the first mip level past the base one.

If you're using D3D/WPF's built-in mip generation, perhaps WPF is using a better-quality downsampling filter than D3D. Since your base texture looks like it has a lot of bright and dark lines, I could see a poor filter giving odd results.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .