This function scales entity-level detail texture coordinates. UV scaling: scaleU/V multiply texture coordinates (scaleU=2.0 repeats texture twice horizontally, scaleU=0.5 stretches texture to half size). UV transform requirement: mesh must be created with BBR_TEXTURE_UV flag, prints helpful error if mesh.allowsUVTransforms = false. Layer identification: searches material detailTextureIndex[0-2] for matching textureHandle (compares both texture handle and SRV heap index for compatibility), finds which layer contains this texture, updates corresponding detailTextureScale[i]. Material handling: surface-based meshes (procedural shapes) update all surface materials directly (all surfaces get same detail scale), loaded meshes (GLB models) auto-clone material if shared (calls EnsureUniqueMaterial first), applies scale to entity's material. Use cases: (1) Detail tiling (scaleU=4.0, scaleV=4.0 to repeat detail 4x4 times for fine patterns), (2) Anisotropic scaling (scaleU=2.0, scaleV=1.0 for horizontal stretching), (3) Uniform scaling (scaleU=scaleV for proportional resize), (4) Dynamic tiling (animate scale for scrolling effects), (5) Resolution matching (scale detail to match mesh size). Common patterns: tile 4x4 b3dScaleDetailTexture(entity, detailTex, 4.0, 4.0), stretch horizontally b3dScaleDetailTexture(entity, detailTex, 2.0, 1.0), animate scrolling scaleU = scaleU + 0.01 then b3dScaleDetailTexture(entity, detailTex, scaleU, scaleV). Typical usage: set scale > 1.0 to tile detail texture for fine patterns (scratches, noise), set scale < 1.0 to stretch detail texture for large features, set different scaleU/V for directional effects, animate for scrolling textures. Entity-level vs surface-level: b3dScaleDetailTexture applies to entire entity (all surfaces on surface-based mesh, single material on loaded mesh), b3dScaleSurfaceDetailTexture applies to specific surface (per-face control), use entity-level for uniform scaling. Material auto-cloning: loaded meshes (GLB) automatically call EnsureUniqueMaterial if shared (prevents affecting other instances), surface-based meshes don't need cloning (each has own materials). Texture handle matching: searches for textureHandle or matching SRV heap index (handles both direct handle and SRV index input, flexible compatibility). Performance: O(1) for loaded mesh (finds layer, updates 2 floats after clone), O(N) for surface-based mesh with N surfaces (all surfaces searched and updated), scale applied in shader. Texture not found: prints error if textureHandle not in any detail layer (must call b3dSetEntityDetailTexture first). Validation: prints error if invalid entity handle, entity not mesh, UV transforms not allowed, entity has no valid material, texture not found in detail layers. Related: b3dPositionDetailTexture offsets entity detail texture UV, b3dRotateDetailTexture rotates entity detail texture UV, b3dSetEntityDetailTexture adds detail layer (required before scaling), b3dScaleSurfaceDetailTexture scales surface-specific detail (per-face control), b3dCreateMesh creates mesh with BBR_TEXTURE_UV flag.