 
     vec4 base_color;
     if (available(BASE_COLOR_MAP)) {
-	base_color = texture2D(u_BaseColorSampler, v_TexCoord) * u_BaseColorFactor;
+	base_color = texture(u_BaseColorSampler, v_TexCoord) * u_BaseColorFactor;
     } else {
 	base_color = u_BaseColorFactor;
     }


    vec3 n;
    if (available(NORMAL_MAP)) {
        n = texture2D(u_NormalSampler, v_TexCoord).rgb;
        n = normalize(tbn * ((2.0 * n - 1.0) * vec3(u_NormalScale, u_NormalScale, 1.0)));
    } else {
        n = tbn[2].xyz;

    }

    if (available(OCCLUSION_MAP)) {
	float ao = texture(u_OcclusionSampler, v_TexCoord).r;
        color = mix(color, color * ao, u_OcclusionStrength);
    }

    if (available(EMISSIVE_MAP)) {
        vec3 emissive = texture(u_EmissiveSampler, v_TexCoord).rgb * u_EmissiveFactor;
        color += emissive;
    }

