MasatoMakino / threejs-shader-materials

Collection of shader materials for three.js
MIT License
304 stars 26 forks source link

add : EdgeShaderMaterial #27

Closed MasatoMakino closed 2 years ago

MasatoMakino commented 2 years ago

こちらの記事を参考に、エッジを描画するマテリアルを作成する。 https://discourse.threejs.org/t/ldraw-like-edges/17100/2

EdgesGeometryはインスタンス化する際に負荷がかかる。 https://threejs.org/docs/#api/en/geometries/EdgesGeometry 頂点が数十万あるジオメトリからエッジジオメトリを生成すると数秒から数十秒のCPU時間がかかる。 パフォーマンス的に、シェーダーで描画した方が有利な可能性がある。

MasatoMakino commented 2 years ago

related : #33

ライトを無視し、法線のみで色が変化するBasicMaterial 半透明で抽象的なモデルを描画する際にエッジの代わりになる。

MasatoMakino commented 2 years ago

see : https://codepen.io/forerunrun/pen/bGrWaKK

MasatoMakino commented 2 years ago

38

このアプローチは閉じないジオメトリでは成立しない。