ShaderToy Common tab

Im not sure where I need to put in Common Tab inside the Lens Studio
Is anyone have a clue?

Also, in which and how to switch TexelFetch if possible?

I don’t know if lens studio supports global functions, which is probably what the common tab is doing. One workaround is to just copy all of that code and place it at the top of each of your shaders.

What do you mean about switching texelfetch?

I found that I can use Texture2D instead of TexelFetch, but the results will be different

I guess I would try texture2d and see if that affects your use-case. I wonder if we can set the precision in LS, because that would be my next suggestion. Using highp will give you less floating point errors so it should make the sampling more accurate on large textures.

1 Like