Jump to content
  • Advertisement

SharpDX - TriangleList renders antialiased but LineList renders with jagged edges

This topic is 769 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

I'm initializing the swap chain with SampleDescription(4, 0) and the output is showing triangle primitives rendered with 4x antialiasing as expected, but the line list is being rendered with no antialiasing at all. What could cause this? See below:



Share this post

Link to post
Share on other sites

Directx 11 Rasterization state: http://msdn.microsoft.com/en-us/library/windows/desktop/ff476198(v=vs.85).aspx


In the state there's a specific option named: AntialiasedLineEnable


I'm not sure about the name in SharpDx though unsure.png


Hope this helps.



Right you are, sir. In SharpDX it appears to be a property of the RasterizerStateDescription, which is used to initialize a new RasterizerState object, which is then assigned to the ImmediateContext object, which is a property of the DeviceContext.

Share this post

Link to post
Share on other sites
                var rasterizerStateDescription1 = new RasterizerStateDescription {
                    CullMode =CullMode.Front,
                    FillMode = FillMode.Solid,
                    IsFrontCounterClockwise =true,IsAntialiasedLineEnabled=true, IsMultisampleEnabled=true


Multisampling must be enabled too.

Share this post

Link to post
Share on other sites

  • 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!