Sets the alpha blending mode for 3D entity rendering. Takes entity (entity handle from b3dCreate* functions, positive integer), blendMode (blending mode: 0=none/opaque, 1=alpha blend, 2=additive, 3=multiply). Returns nothing. Controls how entity pixels blend with background, affects transparency and visual effects.
Sets the alpha blending mode for 3D entity rendering. Takes entity (entity handle from b3dCreate* functions, positive integer), blendMode (blending mode: 0=none/opaque, 1=alpha blend, 2=additive, 3=multiply). Returns nothing. Controls how entity pixels blend with background, affects transparency and visual effects.
Blend modes: 0=opaque (no blending, fully solid rendering, alpha ignored, fastest), 1=alpha blend (standard transparency, src_alpha*src + (1-src_alpha)*dst, for glass/fading effects), 2=additive (brightening blend, src+dst, for glows/lights/particles), 3=multiply (darkening blend, src*dst, for shadows/tinting).
Use cases: (1) Transparent objects (windows, water, glass with alpha blend), (2) Particle effects (fire, explosions, magic with additive), (3) Lighting effects (spotlights, glows, halos with additive), (4) Shadow/tint overlays (ambient occlusion, fog with multiply).
Common patterns: transparent glass = b3dEntityBlend(glass, 1): b3dSetEntityAlphaFX(glass, 0.5); glowing particle = b3dEntityBlend(particle, 2): b3dSetEntityColorFX(particle, 255, 128, 0); opaque solid = b3dEntityBlend(cube, 0).
Performance: blend mode affects GPU performance (opaque fastest, blend modes slower), additive/multiply may disable depth write (prevents z-fighting), alpha blend requires sorted rendering (back-to-front for correctness), opaque objects render first (then blended objects).
Render order: opaque entities render first (with depth write), transparent entities sort by distance (back-to-front), blend mode affects batching (mode changes break batches).
Related: b3dSetEntityAlphaFX sets entity transparency value, b3dSetEntityColorFX sets entity color tint, b3dEntityOrder sets render order priority.