Seeking assistance with shaders in Threejs. I have a plane that requires a mixture of 10 different textures; currently using ShaderMaterial and passing all textures for blending. Below is my Fragment Shader code:
vec3 CFull = texture2D(tFull, vUv).rgb;
vec3 CIndustria = texture2D(tIndustria, vUv ).rgb;
vec3 CCave = texture2D(tCave, vUv).rgb;
vec3 CRifiuti = texture2D(tRifiuti, vUv).rgb;
vec3 CEdile = texture2D(tEdile, vUv).rgb;
vec3 CEventi = texture2D(tEventi, vUv).rgb;
vec3 CMarine = texture2D(tMarine, vUv).rgb;
vec3 COil = texture2D(tOil, vUv).rgb;
vec3 CStrade = texture2D(tStrade, vUv).rgb;
vec3 CVerde = texture2D(tVerde, vUv).rgb;
c = CFull * CIndustria * CCave * CRifiuti * CEdile * CEventi * CMarine * COil * CStrade * CVerde;
gl_FragColor = vec4(c, 1.0);
The code functions properly on Android or desktop platforms, but encounters issues on iOS. When using only 4/5 textures, it works fine on iOS...
Possibly the issue lies in the complexity of the shader? Any suggestions for optimizing the code? (or alternative solutions)