Hi, everyone.
I’m working on a custom shader, it interpolates between textures.
This is the fragmentShader part I’m stucked.
uniform float tSelected;
uniform sampler2D tBase;
uniform sampler2D tClasica;
uniform sampler2D tPlatino;
uniform sampler2D tDoble;
vec4 _tBase = texture2D(tBase, uv);
vec4 _tSelected;
// if(tSelected = 0) _tSelected = texture2D(tPlatino, uv);
// if(tSelected = 1) _tSelected = texture2D(tDoble, uv);
// if(tSelected = 2) _tSelected = texture2D(tClasica, uv);
’tSelected’ is updated, and depending that value choses one between 3 textures.
But this throws error.
Any help or guide here?