#ifndef IPBR_COMPAT_MODE
    float minAlpha = min(color.a, texture2DLod(tex, texCoord, 0).a);
#else
    float minAlpha = color.a;
#endif

if (minAlpha > 0.001) {
    smoothnessG = 1.0;
    highlightMult = 6.5;
    reflectMult = 1.0;

    // Make the frame/border also glass-clear and reflective
    color.a = 0.20; // Transparent but tint still clearly visible
    materialMask = OSIEBCA * 242.0; // Glass refraction marker

    translucentMultCalculated = true;
    translucentMult = vec4(0.0, 0.0, 0.0, 1.0);
} 

else {
    #ifdef FANCY_GLASS
        smoothnessG = 1.0;
        highlightMult = 7.0;
        reflectMult = 1.0;
        color.rgb = vec3(0.95, 0.97, 0.99);

        materialMask = OSIEBCA * 242.0; // Glass refraction marker

        translucentMultCalculated = true;
        translucentMult.a = 0.0;

        color.a = max(color.a, GLASS_OPACITY);

        DoTranslucentTweaks(color, fresnelM, reflectMult, lViewPos);
    #else
        discard;
    #endif
}