-
-
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 texture reading / passed as argument in Fn does not work #30133
Comments
Hey hello @sunag ! Bumping into this problem quite a few times, |
This feature is on the roadmap, for now you can use it without |
Hey @sunag ! Thanks for the reply ! Here is the fiddle with the problem :
And I could not find any examples in the repo or the wiki passing a texture as an args into the setLayout https://jsfiddle.net/0w3mhbfa/107/ Edit : Sorry I mis-red your answer, I'll check without the setLayout |
Well, for my use-case I did try to implement without the setLayout, but using Fn without setlayout also does not work : https://jsfiddle.net/yhp1gt0L/2/ It certainly work using inlines, but then it is not possible to assign / instantiate properties, varyings etc.. |
Try using |
Description
Hello there !
Sampling a texture via inline materialnode look straightforward :
Using Fn and passing a texture as argument makes it challenging and not working ( tdisp.sample is not a function ) :
Been looking at the example folder, and there is no example of passing a texture in a Fn
The transpiler gives wrong results :
But also, it all seems unclear how to use textures as uniforms / in nodes,
To test you can move the CASE variable from 0 to 1
Live example
https://jsfiddle.net/0w3mhbfa/107/
Screenshots
No response
Version
last
Device
Desktop
Browser
Chrome
OS
MacOS
The text was updated successfully, but these errors were encountered: