The integer constant PRIM_ALPHA_MODE has the value 38

Used to specify how the alpha channel of the diffuse texture should affect rendering of a prim’s face.

Syntax

integer PRIM_ALPHA_MODE = 38;

Usage

[ PRIM_ALPHA_MODE, integer face, integer alpha_mode, integer mask_cutoff ]

integerfacea face number or ALL_SIDES
integeralpha_modePRIM_ALPHA_MODE_* flag
integermask_cutoffwhen the alpha rendering mode is PRIM_ALPHA_MODE_MASK, sets the alpha value above which a pixel renders as fully opaque, in the range 0 to 255

When used with llSetPrimitiveParams & llSetLinkPrimitiveParams

llGetPrimitiveParams([ PRIM_ALPHA_MODE, integer face ]);

Returns the list [ integer alpha_mode, integer mask_cutoff ]

integerfacea face number or ALL_SIDES

integeralpha_modePRIM_ALPHA_MODE_* flag
integermask_cutoffwhen the alpha rendering mode is PRIM_ALPHA_MODE_MASK, sets the alpha value above which a pixel renders as fully opaque, in the range 0 to 255
alpha_mode FlagsVDescriptionNotes
PRIM_ALPHA_MODE_NONE0Render the diffuse texture as though the alpha channel were nonexistentThe viewer’s build tool sets this by default when a face has a material and no alpha channel is present in the diffuse texture.
PRIM_ALPHA_MODE_BLEND1Render the diffuse texture with alpha-blending.This value is also used as the default to clear the materials settings from a prim face.
PRIM_ALPHA_MODE_MASK2Render the prim face in alpha-masked mode.Diffuse texture pixels which are more opaque than mask_cutoff will be rendered as fully opaque, while the other pixels will be fully transparent.
PRIM_ALPHA_MODE_EMISSIVE3Render the prim face in emissivity mode.Diffuse texture pixels opacity maps to their emissivity when rendered. Fully opaque pixels will effectively be rendered as ‘full bright’.

Examples

llSetPrimitiveParams([ PRIM_ALPHA_MODE, ALL_SIDES, PRIM_ALPHA_MODE_NONE, 0 ]);
llSetPrimitiveParams([ PRIM_ALPHA_MODE, ALL_SIDES, PRIM_ALPHA_MODE_MASK, 130 ]);

Notes

See also

Functions

Deep notes

Issues