ianmackenzie / elm-3d-scene

A high-level 3D rendering engine for Elm, with support for lighting, shadows, and realistic materials.
https://package.elm-lang.org/packages/ianmackenzie/elm-3d-scene/latest/
Mozilla Public License 2.0
205 stars 27 forks source link

Add support for silhouette edges #26

Open ianmackenzie opened 5 years ago

ianmackenzie commented 5 years ago

Should be able to reuse much of the shadow edges logic to tag lines with their adjacent face normals, then only render silhouette edges

ianmackenzie commented 4 years ago

Similar to Mesh.shadow, might be able to have

Mesh.silhouette : Mesh coordinates a -> Silhouette coordinates

and then Scene3d.silhouette, Scene3d.withSilhouette etc.

ianmackenzie commented 4 years ago

Possibly useful: use trick described in http://www.terathon.com/gdc07_lengyel.pdf to adjust depth calculation, instead of using actual polygon offset