Skip to content

Commit

Permalink
SSAO is not intended for points
Browse files Browse the repository at this point in the history
  • Loading branch information
LiangliangNan committed Sep 27, 2023
1 parent 078e930 commit c158594
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions easy3d/renderer/ambient_occlusion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,17 @@ namespace easy3d {
program->set_uniform("MANIP", MANIP)
->set_uniform("NORMAL", NORMAL);

#if 0
// Liangliang: SSAO is disabled for points drawables because the shader "ssao/geometry_pass" requires normal information,
// while normal informaiton is not always available for points drawables (e.g., points without normals, and
// the "locks" drawable for non-manifold vertices.
for (auto d : model->renderer()->points_drawables()) {
if (d->is_visible()) {
ClippingPlane::instance()->set_program(program);
d->gl_draw(); easy3d_debug_log_gl_error
}
}
#endif
for (auto d : model->renderer()->triangles_drawables()) {
if (d->is_visible()) {
ClippingPlane::instance()->set_program(program);
Expand Down

0 comments on commit c158594

Please sign in to comment.