 
     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;
     }

    float metallic = u_MetallicRoughnessValues.x;

    if (available(METALLIC_ROUGHNESS_MAP)) {
	vec4 mr_sample = texture2D(u_MetallicRoughnessSampler, v_TexCoord);
	perceptual_roughness = mr_sample.g * perceptual_roughness;
	metallic = mr_sample.b * metallic;
    }


    vec3 n;
    if (available(NORMAL_MAP)) {
        n = texture(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;
