// This file has been automatically generated from resource file src/Shaders/PBRIllumination.glsl static const char Shaders_PBRIllumination_glsl[] = "//! Calculates direct illumination using Cook-Torrance BRDF.\n" "vec3 occPBRIllumination (in vec3 theView,\n" " in vec3 theLight,\n" " in vec3 theNormal,\n" " in vec4 theBaseColor,\n" " in float theMetallic,\n" " in float theRoughness,\n" " in float theIOR,\n" " in vec3 theLightColor,\n" " in float theLightIntensity)\n" "{\n" " vec3 aHalf = normalize (theView + theLight);\n" " float aCosVH = max(dot(theView, aHalf), 0.0);\n" " vec3 aFresnel = occPBRFresnel (theBaseColor.rgb, theMetallic, theIOR, aCosVH);\n" " vec3 aSpecular = occPBRCookTorrance (theView,\n" " theLight,\n" " theNormal,\n" " theBaseColor.rgb,\n" " theMetallic,\n" " theRoughness,\n" " theIOR);\n" " vec3 aDiffuse = vec3(1.0) - aFresnel;\n" " aDiffuse *= 1.0 - theMetallic;\n" " aDiffuse *= INV_PI;\n" " aDiffuse *= theBaseColor.rgb;\n" " aDiffuse = mix (vec3(0.0), aDiffuse, theBaseColor.a);\n" " return (aDiffuse + aSpecular) * theLightColor * theLightIntensity * max(0.0, dot(theLight, theNormal));\n" "}\n";