Sets entity transparency alpha (0.0=invisible, 1.0=opaque, auto-enables blending if <1.0). Takes entity (mesh/billboard entity handle), alpha (0.0-1.0 double). Returns nothing. Clamps alpha to 0.0-1.0 range, updates material baseColorFactor.w (alpha channel) or billboard alpha, automatically enables blending if alpha < 1.0 (sets blendMode=1) or disables if alpha = 1.0 (sets blendMode=0). Mesh and billboard entities.
This function sets transparency. Alpha meaning: controls opacity (0.
Sets entity transparency alpha (0.0=invisible, 1.0=opaque, auto-enables blending if <1.0). Takes entity (mesh/billboard entity handle), alpha (0.0-1.0 double). Returns nothing. Clamps alpha to 0.0-1.0 range, updates material baseColorFactor.w (alpha channel) or billboard alpha, automatically enables blending if alpha < 1.0 (sets blendMode=1) or disables if alpha = 1.0 (sets blendMode=0). Mesh and billboard entities.
This function sets transparency. Alpha meaning: controls opacity (0.0 = fully transparent/invisible, 0.5 = semi-transparent, 1.0 = fully opaque/solid). Value clamping: input clamped to 0.0-1.0 range (negative values become 0.0, values > 1.0 become 1.0). Material handling: surface-based meshes (procedural shapes) update all surface materials directly, loaded meshes (GLB models) use material override system (checks entity.materialOverrideIndex, uses override if exists else uses mesh.materialIndex), billboard entities directly set billboard->alpha. Automatic blending: if alpha < 1.0 sets material.blendMode=1 (alpha blend mode for standard transparency rendering), if alpha = 1.0 sets material.blendMode=0 (solid/opaque rendering for performance). Use cases: (1) Transparent objects (0.3-0.7 for glass, water, ghosts, holograms), (2) Fade effects (animate alpha 1.0 to 0.0 for disappearing, 0.0 to 1.0 for appearing), (3) UI transparency (0.5 for semi-transparent menus, health bars), (4) Particle effects (billboard alpha for fading particles), (5) X-ray vision (0.3 alpha for seeing through walls). Common patterns: glass b3dSetEntityAlphaFX(entity, 0.3), fade out alpha = alpha - 0.01 until 0.0, fade in alpha = alpha + 0.01 until 1.0, hologram b3dSetEntityAlphaFX(entity, 0.5), invisible b3dSetEntityAlphaFX(entity, 0.0). Typical usage: set to 0.0-0.5 for transparent objects (glass, water, ghosts), animate for fade in/out effects, set to 0.0 to make invisible (collision still works), use with billboards for particle alpha fading. PBR alpha channel: stored in baseColorFactor.w (RGBA fourth component), multiplied with baseColorTexture alpha if texture present (finalAlpha = texAlpha * factorAlpha). Blend modes: blendMode=0 solid (no transparency, faster rendering, opaque objects), blendMode=1 alpha blend (standard transparency, src * srcAlpha + dest * (1-srcAlpha), slower due to sorting requirements). Transparency rendering: transparent objects require back-to-front sorting for correct appearance (renderer sorts by distance to camera), performance cost higher than opaque (can't use early-Z rejection, requires blending operations). Material override: uses same clone-on-write pattern as SetEntityColorFX (prevents shared material modification). Billboard alpha: directly sets billboard->alpha field (simpler than mesh materials, no blend mode toggle). Performance: O(1) for single surface mesh or billboard, O(N) for N-surface procedural mesh, transparent rendering slower than opaque (sorting overhead, blending operations, no early-Z). Default value: likely 1.0 (fully opaque) if not set (verify during testing). Validation: prints error if invalid entity handle, prints error for mesh entities without materials, prints error for billboard entities without billboard data, prints error if entity is not mesh or billboard type. Related: b3dSetEntityColorFX sets base color RGB (alpha is fourth component), b3dGetEntityAlphaFX reads current alpha value, b3dEntityAlpha may be legacy function (verify relationship).