Open
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- 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.shadowPositionNode
tomaterial.receivedShadowPositionNode
Examples: Addwebgpu_caustics
and 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
transformed
prefix TSL: Removetransformed*
prefix - WIP #31177- Remove the
transformed
prefix fromtransformedNormalView
,transformedNormalWorld
, and similar variables to improve readability and ease of use.
- Remove the
- Improve
.assign()
behavior- Automatically create a variable when possible, or provide a more user-friendly error message.
- Enhance documentation
- Improve clarity, examples, and coverage of TSL concepts.
- Improve Transpiler
- Add flow control and make the code less verbose
- Implement GLSL-to-WGSL transpilation
- Enable automatic conversion of GLSL shaders to WGSL for WebGPU support.
- Add
LegacyShaderMaterial
- Introduce a compatibility layer for older shader materials.
- Migration guide
- Creating a migration guide from
*ShaderMaterial
toTSL
andNodeMaterial
- Creating a migration guide from
- Replace
Proxy
withprototype
- Investigate the feasibility of using prototypes instead of
Proxy
for better performance.
- Investigate the feasibility of using prototypes instead of