Skip to content

Commit

Permalink
demo: Add polygonOffsetFactor for debug visualization
Browse files Browse the repository at this point in the history
Constant offset is not quite enough to make sure the visualization lines
cleanly render on top of solid geometry.
  • Loading branch information
zeux committed Sep 27, 2024
1 parent 58a0290 commit b0e689f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions demo/simplify.html
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@
// use small depth offset to avoid overlay z-fighting with the original mesh
// has to be done on the main material as overlays use lines that don't support depth offset
object.material.polygonOffset = true;
object.material.polygonOffsetFactor = 0.5;
object.material.polygonOffsetUnits = 16;

object.material = [
Expand Down

0 comments on commit b0e689f

Please sign in to comment.