Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


General image quality


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Yura   Members   -  Reputation: 263

Like
0Likes
Like

Posted 11 March 2013 - 02:57 AM

Hi all, 

I'm using Sharpdx on WinForms to draw some primitives on 3D scene. My problem is that result image is nod very "pretty",  especially after using rotation or scale, lines becomes very ugly.. Seems like linear interpolation has low-order

 

See yourself : Capture.PNG

 

 

 I know that WinForms using pixel graphics and it is not the best desision to use it for 3D rendering, but I've tried to use same code on WPF and receive the same result. So, I've made a conclusion, that the problem is somewhere inside. Device initialization attached bellow smile.png

 

d3dDevice = new Device(
                         d3d,
                         0,
                         DeviceType.Hardware,
                         handle,
                         CreateFlags.HardwareVertexProcessing,
                         new PresentParameters()
                         {
                             Windowed = true,
                             SwapEffect = SwapEffect.Discard,
                             BackBufferCount = 1,
                             BackBufferFormat = Format.Unknown,
                             PresentationInterval = PresentInterval.Immediate,
                             BackBufferWidth = width,
                             BackBufferHeight = height,
                             EnableAutoDepthStencil = true,
                             AutoDepthStencilFormat = Format.D16,
                             //MultiSampleQuality = 0,                              --> tried to use these
                             //MultiSampleType = MultisampleType.FourSamples            but no desire result
                         });          

 

 



Sponsor:

#2 Zaoshi Kaba   Crossbones+   -  Reputation: 4439

Like
1Likes
Like

Posted 11 March 2013 - 04:08 AM

That's... normal. It's called aliasing. You'll have to use one of antialiasing techniques to make it better, ex.:

MSAA (you partially tried it)

http://en.wikipedia.org/wiki/Fast_approximate_anti-aliasing



#3 Jason Z   Crossbones+   -  Reputation: 5164

Like
1Likes
Like

Posted 11 March 2013 - 05:13 AM

If you are talking about the 'jaggedness' of the lines, then you could try either MSAA (as Zaoshi mentioned) or you could also try the multisampled line rendering option in the rasterizer state object.  Your luck will vary with the latter option, as it is vendor specific and can be different quality on different hardware.

 

If neither of thos work for you, you can try some simulated line thickness algorithms - I believe there was an article in one of the GPU gems books that described this.  It is more or less using a quad to draw a line, and is a bit more work for each line than normal.

 

EDIT: Sorry - I just saw that you are using D3D9, so you can ignore the rasterizer state comment there...


Edited by Jason Z, 11 March 2013 - 05:16 AM.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS