Skip to content

PRIM_ALPHA_MODE

constant
Constant
integer PRIM_ALPHA_MODE = 38;
Set with llSetLinkPrimitiveParamsFast
PRIM_ALPHA_MODE, integer face, integer alpha_mode, integer mask_cutoff
Get with llGetLinkPrimitiveParams, llGetPrimitiveParams
PRIM_ALPHA_MODE, integer face → integer alpha_mode, integer mask_cutoff
  1. integer face// Values: Faces
  2. integer alpha_mode// Values: AlphaMode
  3. integer mask_cutoff// Range 0–255

Prim parameter used to set diffuse texture alpha rendering mode attributes. Requires face, alpha_mode (PRIM_ALPHA_MODE_BLEND, _NONE, _MASK, or _EMISSIVE), and alpha_cutoff (used only for _MASK) parameters.

Other PrimParam values (42)
Other PrimParamGet values (40)

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

PRIM_ALPHA_MODE, integer face, integer alpha_mode, integer mask_cutoff

When used with llSetLinkPrimitiveParamsFast

llGetLinkPrimitiveParams(LINK_THIS, [ PRIM_ALPHA_MODE, integer face ]);

Returns the same values, in the same order.

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’.
Example 1
llSetLinkPrimitiveParamsFast(LINK_THIS, [ PRIM_ALPHA_MODE, ALL_SIDES, PRIM_ALPHA_MODE_NONE, 0 ]);
llSetLinkPrimitiveParamsFast(LINK_THIS, [ PRIM_ALPHA_MODE, ALL_SIDES, PRIM_ALPHA_MODE_MASK, 130 ]);
Original wiki source

Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.

From the Second Life Wiki

Community documentation adapted from PRIM ALPHA MODE, by Linden Research, Inc. and contributing residents.View contributors and history.

Imported wiki revision:

Licensed under CC BY-SA 3.0. Last wiki edit: .Formatting and links have been adapted for this site; API metadata follows the LSL definitions.

  1. Viewer 746d768339: llprimitive/llmaterial.h:40-48 ↩

  2. Viewer 746d768339: llprimitive/llmaterial.h:147 ↩