This function adjusts detail layer opacity. Alpha clamping: input clamped to 0.0-1.0 range (negative values become 0.0, values > 1.0 become 1.0). Layer identification: searches detailTextureIndex[0-2] for matching textureHandle (finds which layer contains this texture), updates corresponding detailBlendFactor[i] (opacity control for that specific layer). Material handling: surface-based meshes (procedural shapes) update all surface materials directly (all surfaces get same alpha), loaded meshes (GLB models) update mesh.materialIndex material (single material for entire mesh), terrain entities update terrain.materialIndex material. Use cases: (1) Subtle weathering (alpha 0.3 for faint dirt/rust overlay), (2) Strong effects (alpha 1.0 for prominent scratches/decals), (3) Fade in/out (animate alpha 0.0 to 1.0 for appearing detail), (4) Conditional detail (alpha 0.0 to hide, 1.0 to show based on game state), (5) Intensity control (alpha varies detail strength, 0.5 = 50% visible). Common patterns: subtle detail b3dSetEntityDetailAlpha(entity, detailTex, 0.3), strong detail b3dSetEntityDetailAlpha(entity, detailTex, 1.0), fade in alpha = alpha + 0.01 until 1.0 then b3dSetEntityDetailAlpha(entity, detailTex, alpha), hide detail b3dSetEntityDetailAlpha(entity, detailTex, 0.0). Typical usage: set lower alpha for subtle surface variation (0.2-0.5 for faint dirt/scratches), set higher alpha for prominent features (0.7-1.0 for decals/markings), animate alpha for dynamic effects (fading details in/out), set to 0.0 to hide without removing (keeps layer slot occupied). Blend factor application: shader multiplies detail texture sample by blendFactor (if factor 0.5 detail contributes 50% to final color, if factor 0.0 detail invisible), affects blending equation (finalColor = baseColor + detailSample * blendFactor). Texture identification: uses textureHandle to find correct layer (not layer index, allows setting alpha by texture without knowing which slot it occupies), handles case where texture not found (silently ignores, may have been removed). Not found behavior: if textureHandle not in any detail layer silently returns (no error, texture may have been removed previously, safe to call). Material layer arrays: detailTextureIndex[3] stores texture handles for 3 layers, detailBlendFactor[3] stores corresponding opacities (parallel arrays, index i matches texture i with factor i). Shader blending: blend factor controls contribution strength (various blend modes: additive finalColor += detail * factor, multiplicative finalColor *= (1 + detail * factor), overlay more complex), factor acts as opacity/intensity control. Multiple layers: can set different alpha per layer (layer 0 at 1.0 for strong scratches, layer 1 at 0.3 for subtle dirt, layer 2 at 0.7 for moderate decal), allows complex multi-layer materials with independent opacity. Performance: O(1) for loaded mesh or terrain (finds layer and updates single float), O(N) for procedural mesh with N surfaces (all surfaces updated), shader cost same regardless of alpha (texture sampled then multiplied by factor, factor=0.0 still samples but contributes nothing). Default value: detailBlendFactor defaults to 1.0 when layer added via b3dSetEntityDetailTexture (fully opaque, call this function to reduce opacity). Validation: prints error if invalid entity handle, invalid texture handle, entity is not mesh or terrain, entity has no material, silently returns if texture not found in detail layers (safe, allows setting alpha before/after adding). Related: b3dSetEntityDetailTexture adds detail layer (sets initial alpha 1.0), b3dRemoveEntityDetailTexture removes detail layer (frees slot), b3dSetEntityBaseTexture sets base texture (detail overlays this).