#How to add ShaderToy shader into R3F ?
8 messages · Page 1 of 1 (latest)
This completely depends on the shader, and often time it will need to be rewritten since they aren't mesh based.
so i cannot just use it inside my geometry as a material , and what is the purpose of shaderToy if we cannot use it inside three js ?
They are unaffiliated and work in a different rendering paradigm. Some are more portable than others, I can maybe point out how it can relate to a mesh if you share an example.
I saw this example just now and i really like it , I was thinking to put it on a brain mesh so it can have that shader effect on the brain
Looking at the shader, you can probably render it to a texture and use as an environment map. This is what it looks like without it.
Raymarched here, a bit more work to make it mesh/geometry based. https://codesandbox.io/s/lh2t8x
Can refer to https://codesandbox.io/s/lf67su if you do go with volumes.