MasatoMakino / threejs-shader-materials

Collection of shader materials for three.js
MIT License
333 stars 27 forks source link

TSLへの移行 #119

Open MasatoMakino opened 4 months ago

MasatoMakino commented 4 months ago

three.jsではWebGPUのサポート拡大に伴い、TSL(TypeScript Shader Language)への移行が開始された。 https://github.com/mrdoob/three.js/wiki/Three.js-Shading-Language https://threejs.org/examples/?q=tsl#webgpu_tsl_transpiler

各種マテリアルをTSLに移植する。 TSLの各種ドキュメント、トランスパイラなどが揃ってから挑戦する。 TSLは2024/05/30時点で開発途上のため、APIの破壊的変更の可能性があることに注意

MasatoMakino commented 3 months ago

TSLに関する部分的な実験は https://github.com/MasatoMakino/threejs-lab を参照すること。

uniform, attributeの参照、およびfbmの関数化が実装できた。 残課題としてpositionの編集(膨らませる)、タイマーアニメーションなどがある。

MasatoMakino commented 3 months ago

related : #123 RimBasicMaterialをNodeマテリアルで書き換え。