     const vec3 kS = F;
     const vec3 kD = (vec3(1.0) - kS) * (1.0 - metallic);
 
-    return (kD * albedo / PI + specular) * radiance * NdotL  * (1.0 - material.transmission) * shadow;
+    return (kD * albedo / PI + specular) * radiance * NdotL  * (1.0 - transmission) * shadow;
   } else {
     return vec3(0, 0, 0);
   }

  vec3 F0 = vec3(0.02);
  F0 = mix(F0, albedo_alpha.rgb, metallic);

  vec3 direct = shade_spotlights(spot_lights, fragment.proj_shadow, shadow_samplers, fragment.position, N, V, NdotV, albedo_alpha.rgb, metallic, roughness);
  direct += shade_directional_light(directional_light, fragment.cascaded_proj_shadow, cascaded_shadow_samplers, N, V, NdotV, albedo_alpha.rgb, metallic, roughness);

  vec3 ambient = vec3(0.0, 0.0, 0.0);
  float attenuation = 0.0f;

                             const in float normal_dot_view_vector,
                             const in vec3 albedo,
                             const in float metallic,
                             const in float roughness,
                             const in float transmission)
{
  if (directional_light.strength > 0.0) {
    vec3 F0 = vec3(0.02);
