<div dir="ltr">I'm not sure what's causing this, enabling FXAA should work out of the box for all data rendered in the opaque/translucent passes. Have you tried with the default options? They shouldn't need to be tweaked unless you're having serious performance / quality issues.<br><br>For SSAA, I'm curious why you're setting the maximum number of peels to 0? That effectively disables peeling and would result in the improper blending that you're seeing.<br><br>HTH,<br>-Allie</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Mar 5, 2019 at 3:43 PM chung <<a href="mailto:chung@navatekltd.com">chung@navatekltd.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi experts,<br>
<br>
I'm using vtk 8.1 and am having a little bit of a trouble getting<br>
anti-aliasing working.<br>
<br>
When using the FXAA approach, the graphic remains the same regardless of the<br>
FXAA options I pass to the renderer.<br>
<br>
vtkSmartPointer<vtkRenderer> renderer =<br>
vtkSmartPointer<vtkOpenGLRenderer>::New();<br>
renderer->SetUseFXAA ( true );<br>
auto options = renderer->GetFXAAOptions();<br>
options->SetSubpixelBlendLimit ( 0.75 );<br>
options->SetHardContrastThreshold ( 0.045 );<br>
options->SetRelativeContrastThreshold ( 0.125 );<br>
options->SetEndpointSearchIterations ( 12 );<br>
options->SetSubpixelContrastThreshold ( 0.25 );<br>
options->SetUseHighQualityEndpoints ( true );<br>
<br>
<<a href="http://vtk.1045678.n5.nabble.com/file/t342714/fxaa.png" rel="noreferrer" target="_blank">http://vtk.1045678.n5.nabble.com/file/t342714/fxaa.png</a>> <br>
<br>
<br>
When using the SSAA render pass approach I have depth buffer issue where the<br>
surfaces of a primitive cube get rendered in an incorrect order. I came<br>
across this depth peeling fix but it didn't work for me unfortunately.<br>
<br>
<a href="http://vtk.1045678.n5.nabble.com/vtk-developers-QVTKOpenGLWidget-SSAA-pass-breaks-depth-peeling-td5746428.html" rel="noreferrer" target="_blank">http://vtk.1045678.n5.nabble.com/vtk-developers-QVTKOpenGLWidget-SSAA-pass-breaks-depth-peeling-td5746428.html</a><br>
<br>
<br>
vtkSmartPointer<vtkRenderer> renderer =<br>
vtkSmartPointer<vtkOpenGLRenderer>::New();<br>
renderer->SetBackground ( 0.615f, 0.639f, 0.666f );<br>
<br>
vtkNew<vtkRenderStepsPass> basicPasses;<br>
vtkNew<vtkSSAAPass> ssaa;<br>
<br>
vtkSmartPointer<vtkDepthPeelingPass> depthPeel = vtkSmartPointer <<br>
        vtkDepthPeelingPass > ::New();<br>
vtkSmartPointer<vtkTranslucentPass> translucent = vtkSmartPointer <<br>
        vtkTranslucentPass > ::New();<br>
depthPeel->SetMaximumNumberOfPeels ( 0 );<br>
depthPeel->SetTranslucentPass ( translucent );<br>
basicPasses->SetTranslucentPass ( depthPeel );<br>
<br>
<br>
ssaa->SetDelegatePass ( basicPasses );<br>
renderer->SetPass ( ssaa );<br>
renderer->SetUseDepthPeeling ( true );<br>
renderer->SetMaximumNumberOfPeels ( 0 );<br>
<br>
<<a href="http://vtk.1045678.n5.nabble.com/file/t342714/ssaa.png" rel="noreferrer" target="_blank">http://vtk.1045678.n5.nabble.com/file/t342714/ssaa.png</a>> <br>
<br>
<br>
I'm not sure what I'm missing and I would greatly appreciate if anyone can<br>
help me spot it.<br>
<br>
Thanks,<br>
Chuan<br>
<br>
<br>
<br>
<br>
--<br>
Sent from: <a href="http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html" rel="noreferrer" target="_blank">http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html</a><br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://vtk.org/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">https://vtk.org/mailman/listinfo/vtkusers</a><br>
</blockquote></div>