     #endif
 
     #ifdef DEBUG_BASECOLOR
-        g_finalColor.rgb = LINEARtoSRGB(baseColor.rgb);
+        g_finalColor.rgb = LINEARtoSRGB(materialInfo.baseColor);
     #endif
 
     #ifdef DEBUG_OCCLUSION

    #endif

    #ifdef DEBUG_EMISSIVE
        g_finalColor.rgb = LINEARtoSRGB(emissive).rgb;
    #endif

    #ifdef DEBUG_F0
        g_finalColor.rgb = vec3(f0);
    #endif

    #ifdef DEBUG_ALPHA

uniform vec3 u_Camera;
uniform int u_MipCount;

struct MaterialInfo
{
    float perceptualRoughness;      // roughness value, as authored by the model creator (input to shader)
    vec3 f0;                        // full reflectance color (normal incidence angle)

    float alphaRoughness;           // roughness mapped to a more linear change in the roughness (proposed by [2])
    vec3 albedoColor;

    vec3 f90;                       // reflectance color at grazing angle
    float metallic;

    vec3 normal; // getNormal()
    vec3 baseColor; // getBaseColor()

    float sheenIntensity;
    vec3 sheenColor;
    float sheenRoughness;

    float clearcoatFactor;
    vec3 clearcoatNormal;
    float clearcoatRoughness;
};

vec4 getBaseColor()
{
    vec4 baseColor = vec4(1, 1, 1, 1);
