texelFetch in ISF

Hi,

I’m watching this video from The art of code [https://www.youtube.com/watch?v=KGJUl8Teipk](http://The universe )
Which the code result can be see here : https://www.shadertoy.com/view/lscczl

But I get stuck with the use of texelFetch function when I tried to import it in ISF Editor I get an error : Invalid call of undeclared identifier ‘texelFetch’

already had the problem with an other shader from Shadertoy
What could be the solution (tried some about texture2D but seems to be not the good way)
Best
Z

Hi There…
Its a great tutorial and great shader - i came across it a while ago and ported it an isf. I think i remember the textures are not needed, but you can load textures using the JSON.
“IMPORTED”: {“noisetex”: { “PATH”: “xxxxx.png” }

Here is the ISF, it has an added speed control and color input.
Howie

Shroomiverse_Htv.fs.zip (2.3 KB)

2 Likes

Hi!
I’m not a shader master but you can try the method I normally use to take out the error.
You just need to convert the texelFetch function to IMG_NORM_PIXEL, the ivec2 to vec2 and delete the 0 (texels)after coma;

float fft = texelFetch( iChannel0, ivec2(.7,0), 0 ).x;

float fft = IMG_NORM_PIXEL( iChannel0, vec2(.7,0) ).x;

Hope this can help you with new cases.

Cheers

1 Like

Thank you !
so I can continue this tutorial now :)

@OriolP works great ! :slight_smile:

1 Like