What is the purpose of setLayout when defining TSL custom functions?

I’m trying to understand TSL. Docs are very sparse. Can anyone point me at useful docs other than Three.js Shading Language · mrdoob/three.js Wiki · GitHub ? At the moment I’m trying to understand setLayout. I’m working on a series of pages to try and explain to others how to use TSL. In the form of learning together. https://niklever.com/getting-to-grips-with-threejs-shading-language-tsl/

Not the type of docs that you look for, but this is what I’ve learned (by experimenting) about TSL function layouts:

What is TSL function layout?

So, the layout is needed when TSL cannot find or cannot estimate the type of the parameters or the type of the result of a TSL function.

3 Likes

Brilliantly useful doc. Many thanks Pavel. Loved your tsl-textures BTW.

1 Like