I found a shader from shadertoy and want to convert it with NME, but i stucked when reaching this code line: textureLod(iChannel0, vec3(1.,1.,1.), 0.0), because there are no textureLod like nodes to use.
So i am wondering, is it possible to make a node chain with other advanced nodes that works like textureLod function?
An NME PG will be so helpful.
Can you show us the original shader on shadertoy? It would help us understand what is the effect the code wants to achieve. But from just looking at the line, the LOD isn’t even necessary, because a LOD of 0 is the same as the default texture.
Yeah, no need to use textureLod there with zero LOD, it’s equivalent to texture. I forked the shader just to show you can swap the two functions for the same effect: Fork Noise plas carolhmj 150 (shadertoy.com) (check line 3)
No, we don’t support regular 3D textures, only reflection textures for which you can load a texture as a cube texture. But the lookup will be dependent on position/normal/world matrix, you can’t pass a straight Vector3 for the lookup.
Note that it may be easier to use those functions once we add custom blocks to the NME (which should happen in the coming days) which will let you use custom glsl code directly.
Thank you all! @carolhmj@Evgeni_Popov@sebavan
I’ll try the CustomBlock feature in this week!
To implement a beautiful and random enough effect with pure NME blocks is hard(in this case), because i need to convert the complex noise code to blocks, it’s a huge work.
But this, is the best solution, absolutely!