-
-
Notifications
You must be signed in to change notification settings - Fork 36.2k
Open
Labels
Description
Description
Roadmap for TSL (Three.js Shading Language)
Overview
This issue tracks planned improvements and changes. The goal is to enhance usability, performance, and maintainability while also laying the groundwork for future tutorials and courses.
https://github.com/mrdoob/three.js/wiki/Three.js-Shading-Language
Would love to hear thoughts and suggestions! 🚀
Tasks
- Improve error handling and validation TSL: Improve
vec*checks and warnings #30811, TSL: Improve warnings #30783, TSL: ImproveFn()warning if not invoked. #31552, TSL: Improve warnings (2) #31562, TSL: Improve error message for operators withvoidvalues #31593- Enhance syntax and value validation to provide clearer error messages.
- Evaluate deprecation of
append()TSL: AddStack()and.toStack()#30956- Consider alternative approaches for chaining operations. It is still needed for some void functions.
- Rename
material.shadowPositionNodetomaterial.receivedShadowPositionNodeExamples: Addwebgpu_causticsand shadow revisions #30962- Intention for renaming, so that we have a property to define the projection of the shadow in the future.
- Add
uniformTexture()TSL: IntroduceuniformTexture()anduniformCubeTexture()#31190- This is already possible with
texture.value, but we consider having an alias to make its use more explicit.
- This is already possible with
- Remove the
transformedprefix TSL: Removetransformed*prefix #31271- Remove the
transformedprefix fromtransformedNormalView,transformedNormalWorld, and similar variables to improve readability and ease of use.
- Remove the
- Improve Transpiler TSL Transpiler: Introduce
Linkerand improvements #31314- Add flow control and make the code less verbose
- Improve
.assign()behavior TSL: Introduce automatic use of.toVar()toassign()#31459- Automatically create a variable when possible, or provide a more user-friendly error message.
- Replace
ProxywithprototypeTSL: ReplaceProxyapproach withprototypes#31691- Investigate the feasibility of using prototypes instead of
Proxyfor better performance.
- Investigate the feasibility of using prototypes instead of
- Implement GLSL-to-WGSL transpilation TSL Transpiler: Introduce
WGSLEncoder#31329- Enable automatic conversion of GLSL shaders to WGSL for WebGPU support.
- Enhance documentation
- Improve clarity, examples, and coverage of TSL concepts.
- Add
LegacyShaderMaterial- Introduce a compatibility layer for older shader materials.
- Migration guide
- Creating a migration guide from
*ShaderMaterialtoTSLandNodeMaterial
- Creating a migration guide from
KurtPachinger, Mugen87, Spiri0, boytchev, BoogieJie and 17 moremrdoob, Fennec-hub, leannepepper, Bug-Reaper, agargaro and 6 morebrunosimon, Bug-Reaper, lin72h, Rabbid76, seantai and 3 more