# Examples from pyvista.Plotter.enable_ssao
# =========================================

# Generate a `pyvista.UnstructuredGrid` with many tetrahedrons
# nearby each other and plot it without SSAO.
import pyvista as pv
ugrid = pv.ImageData(dimensions=(3, 2, 2)).to_tetrahedra(12)
exploded = ugrid.explode()
exploded.plot()

# Enable SSAO with the default parameters.
pl = pv.Plotter()
_ = pl.add_mesh(exploded)
pl.enable_ssao()
pl.show()

# ----------------------------------------------------------------------
# Generated by sphinx-examples-as-code https://github.com/pyvista/sphinx-examples-as-code

