-
-
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: Introduces cache hierarchy #28585
Conversation
Just tested as I had multiple times today the same issue as #28546 and this PR does seem to also introduce a small issue for the moment. 😁 Error comes from the const hue2rgb = tslFn( ( [ p, q, t ] ) => {
t = cond( t.lessThan( 0.0 ), t.add( 1.0 ), t );
t = cond( t.greaterThan( 1.0 ), t.sub( 1.0 ), t );
return cond(
t.lessThan( 1.0 / 6.0 ),
p.add( ( q.sub( p ) ).mul( 6.0 ).mul( t ) ),
cond(
t.lessThan( 1.0 / 2.0 ),
q,
cond(
t.lessThan( 2.0 / 3.0 ),
p.add( ( q.sub( p ) ).mul( float( 2.0 / 3.0 ).sub( t ) ).mul( 6.0 ) ),
p
)
)
);
} );
const palette = tslFn( ( [ t ] ) => {
const color = hslToRgb(hue2rgb(...
return color
})
particleMaterial.colorNode = palette( buffer.toAttribute().length() ) |
@RenaudRohlinger Since declaration of attributes, variables etc are related to cache we may have some revisions after this. I just update this PR, could you please let me know if it fixed it for you? Thanks for reporting the problem! :) |
It does fix my issue! Thanks @sunag |
Related issue: Closes #28546
Description
The objective is that when using a node it will look in some parent if the variable has already been declared, similar to the block hierarchy adopted in JS for example.