We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello there !
Sampling a texture via inline materialnode look straightforward :
const uTex = texture( tex ); material.colorNode = uTex.sample(oneMinus( uv() ));
Using Fn and passing a texture as argument makes it challenging and not working ( tdisp.sample is not a function ) :
const sampleTex = Fn(([tdisp])=> { return tdisp.sample(oneMinus( uv() ) ) }).setLayout( { name: 'sampleTex', type: 'float', inputs: [ { name: "sampleTex", //type: "texture" type: "sampler2D" } ] } ) material.colorNode = Fn(()=>{ return sampleTex(uTex) })()
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
https://jsfiddle.net/0w3mhbfa/107/
No response
last
Desktop
Chrome
MacOS
The text was updated successfully, but these errors were encountered:
No branches or pull requests
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: