• Advertisement

SharpDX - TriangleList renders antialiased but LineList renders with jagged edges

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:

 

2014-02-23_0058.png

Share this post


Link to post
Share on other sites
Advertisement

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.

-MIGI0027

 

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

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