amo
1
Hi,
My shader works well but I can’t apply the second line of code below:
vec3 texture = texture2D(uTexture, vUv).rgb;
vec3 aa = texture2D(uTexture, vUv).rgb;
I got this error
If I comment the second line, everything is fine. I can’t apply texture2D twice ? I tried everything else, it’s the only solution I see.
Thanks for your help
you assigned the variables “aa” and “texture” to the same value…
I don’t know the purpose of this, but you should either say vec3 aa = texture
I don’t work with shaders but that’s all I could come up with…
texture
Think of it as of a reserved word. Try to use something like tex
or texture1
instead.
1 Like
amo
4
Thank you, it must be that, I will check tomorrow