Skip to main content

Function: applyBlendMode()

applyBlendMode(material, mode): void

Defined in: src/rendering/blendModes.ts:62

Apply a blend mode to a single three.js material in place.

The material version only bumps (needsUpdate) when the blending constant actually changes, so re-applying the same mode is cheap and idempotent. For 'screen' the custom blend equation and factors are set explicitly.

Parameters​

material​

Material

The material to configure.

mode​

BlendMode

The blend mode to apply.

Returns​

void