Variable FALLBACK_SHADE_LOBE_WGSLConst
FALLBACK_SHADE_LOBE_WGSL: "\nconst HIT_SHADOW_RAY_LENGTH: f32 = 1e30;\nfn hitSpecularRadiance(P: vec3f, R: vec3f, roughness: f32) -> vec3f { return sampleRadianceFallback(P, R, roughness); }\n\n// The specular lobe and clear coat on top of the diffuse part (W41, D3510); needs\n// hitSpecularRadiance(P, R, roughness), the radiance along R at a perceptual roughness.\nfn hitShadeSurface(hit: Hit, P: vec3f, N: vec3f, dir: vec3f, emissive: vec3f, diffuse: vec3f) -> vec3f {\n return hitShadeLobe(traceHitSpecular(hit), P, N, dir, emissive, diffuse);\n}\n// The same for a lobe that does not come from the provider (W44, D3540: a screen-space hit's\n// material read from the G-buffer).\nfn hitShadeLobe(s: HitSpecular, P: vec3f, N: vec3f, dir: vec3f, emissive: vec3f, diffuse: vec3f) -> vec3f {\n if (!rtHitSpecularOn() || (max(s.color.x, max(s.color.y, s.color.z)) <= 0.0 && s.clearcoat <= 0.0)) { return emissive + diffuse; }\n let R = reflect(dir, N);\n let NdotV = clamp(dot(N, -dir), 1e-4, 1.0);\n // Specular visibility (D3513): one any-hit ray along R; where geometry blocks it, what the lobe sees\n // is not the environment / probe (a car's sill over a mirror floor sees its own underside). Rough\n // lobes leak around the blocker, so the occlusion fades out from roughness 0.3 to 1.\n var vis = 1.0;\n if (!traceLightVisible(P, N, R, HIT_SHADOW_RAY_LENGTH)) { vis = smoothstep(0.3, 1.0, s.roughness); }\n let envBase = hitSpecularRadiance(P, R, hitLookupRoughness(s.roughness)) * vis;\n var envCoat = envBase;\n if (s.clearcoat > 0.0 && abs(s.clearcoatRoughness - s.roughness) > 0.02) { envCoat = hitSpecularRadiance(P, R, hitLookupRoughness(s.clearcoatRoughness)) * select(smoothstep(0.3, 1.0, s.clearcoatRoughness), 1.0, vis >= 1.0); }\n return emissive + hitLayered(s, diffuse, envBase, envCoat, NdotV);\n}\n" = ...
hitShadeLobe/hitShadeSurfaceon the pass's radiance fallback (sampleRadianceFallbackalong R at the lobe's roughness), for a hit shading that does not define them (core'sfallbackHitShading, or a screen-space pass without one; W44, D3540).