Variable getIBLIndirectAnisotropyRadianceConst
getIBLIndirectAnisotropyRadiance: "\nfn getIBLIndirectAnisotropyRadiance(\n normal: vec3f,\n viewDirection: vec3f,\n roughness: f32,\n clampSampler: sampler,\n envSpecularTexture: texture_cube<f32>,\n envRotation: mat3x3f,\n envSpecularIntensity: f32,\n bitangent: vec3f,\n anisotropy: f32\n) -> vec3f {\n // https://google.github.io/filament/Filament.md.html#lighting/imagebasedlights/anisotropy\n var bentNormal: vec3f = cross( bitangent, viewDirection );\n bentNormal = normalize( cross( bentNormal, bitangent ) );\n bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\n\n return getIBLIndirectRadiance(\n bentNormal,\n viewDirection,\n roughness,\n clampSampler,\n envSpecularTexture,\n envRotation,\n envSpecularIntensity,\n );\n}\n" = ...
Helper function chunk appended internally and used to compute IBL indirect anisotropy radiance, based on environment specular map.