Skip to content
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

One TSL function calculating two values for two nodes #1

Open
boytchev opened this issue Jun 14, 2024 · 2 comments
Open

One TSL function calculating two values for two nodes #1

boytchev opened this issue Jun 14, 2024 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@boytchev
Copy link
Owner

How to implement efficiently this scenario in TSL:

  • one function calculates both color and opacity
  • color goes to one node
  • opacity goes to another node

This scenario is in src/clouds.js and raises two issues:

  • Maybe the TSL function is calculated twice - once for color and again for opacity
  • The translation into fallback WebGL2 is rather slow - up to 3-4 seconds
@boytchev boytchev added the help wanted Extra attention is needed label Jun 14, 2024
@mrdoob
Copy link

mrdoob commented Nov 25, 2024

/ping @sunag

@sunag
Copy link

sunag commented Nov 25, 2024

Wouldn't it be better to return a vec4() and let the user choose whether to use rgb or a?

var clouds = Fn( ( params ) => {
return _clouds( params ).rgb;
} );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants