Variable getIBLIndirectRadianceConst
getIBLIndirectRadiance: "\nfn getIBLIndirectRadiance(\n normal: vec3f,\n viewDirection: vec3f,\n roughness: f32,\n specularColor: vec3f,\n specularFactor: f32,\n iBLGGXFresnel: IBLGGXFresnel,\n clampSampler: sampler,\n envSpecularTexture: texture_cube<f32>,\n envRotation: mat3x3f,\n envSpecularIntensity: f32,\n)-> vec3f {\n let N: vec3f = normal;\n let V: vec3f = viewDirection;\n let NdotV: f32 = saturate(dot(N, V));\n\n let reflection: vec3f = normalize(reflect(-V, N));\n\n let lod: f32 = roughness * f32(textureNumLevels(envSpecularTexture) - 1);\n\n let specularLight: vec4f = textureSampleLevel(\n envSpecularTexture,\n clampSampler,\n reflection * envRotation,\n lod\n );\n\n return specularLight.rgb * envSpecularIntensity;\n}\n" = ...
Helper function chunk appended internally and used to compute IBL indirect radiance, based on environment specular map.