-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TSL: Move ShaderNode
to tslFn()
#26311
Conversation
Move `func()` -> `wgslFn()` Move `shader()` -> `fn()`
I think I'm fine with such a rename 👍 And the removal of |
How about |
Sometimes I think I was thinking about making |
const desaturateFn = fn( `
fn desaturate( color:vec3<f32> ) -> vec3<f32> {
}
` ); That double |
Hmm, maybe capitalizing them...?
|
I was thinking of this change as just const desaturateFn = fn( ( [ color ] ) => {
} );
It looks interesting flow control nodes will have a pattern. const desaturateFn = Fn( ( [ color ] ) => {
Loop( count, => {
Break();
} );
} ); |
Yeah, easier to read I think 🤔 |
Description
This is a big revision, it's a simplification of how
TSL
work with functions, this was based in some studies and conversations with users of three.js.Removing
.call()
from TSL designCreating a
ShaderNode
function usingtslFn
.Using native functions
wgslFn()
orglslFn()
/cc @mrdoob @LeviPesin @Mugen87