constant
ConstantSet with Get with
integer PRIM_ALPHA_MODE = 38;llSetLinkPrimitiveParamsFastPRIM_ALPHA_MODE, integer face, integer alpha_mode, integer mask_cutoffllGetLinkPrimitiveParams, llGetPrimitiveParamsPRIM_ALPHA_MODE, integer face → integer alpha_mode, integer mask_cutoffPrim 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)
PRIM_ALLOW_UNSIT39PRIM_BUMP_SHINY19PRIM_CLICK_ACTION43PRIM_COLLISION_SOUND53PRIM_COLOR18PRIM_DAMAGE51PRIM_DESC28PRIM_FLEXIBLE21PRIM_FULLBRIGHT20PRIM_GLOW25PRIM_GLTF_BASE_COLOR48PRIM_GLTF_EMISSIVE46PRIM_GLTF_METALLIC_ROUGHNESS47PRIM_GLTF_NORMAL45PRIM_HEALTH52PRIM_LINK_TARGET34PRIM_MATERIAL2PRIM_NAME27PRIM_NORMAL37PRIM_OMEGA32PRIM_PHANTOM5PRIM_PHYSICS3PRIM_PHYSICS_SHAPE_TYPE30PRIM_POINT_LIGHT23PRIM_POS_LOCAL33PRIM_POSITION6PRIM_PROJECTOR42PRIM_REFLECTION_PROBE44PRIM_RENDER_MATERIAL49PRIM_ROT_LOCAL29PRIM_ROTATION8PRIM_SCRIPTED_SIT_ONLY40PRIM_SIT_FLAGS50PRIM_SIT_TARGET41PRIM_SIZE7PRIM_SLICE35PRIM_SPECULAR36PRIM_TEMP_ON_REZ4PRIM_TEXGEN22PRIM_TEXT26PRIM_TEXTURE17PRIM_TYPE9
Other PrimParamGet values (40)
PRIM_ALLOW_UNSIT39PRIM_BUMP_SHINY19PRIM_CLICK_ACTION43PRIM_COLLISION_SOUND53PRIM_COLOR18PRIM_DAMAGE51PRIM_DESC28PRIM_FLEXIBLE21PRIM_FULLBRIGHT20PRIM_GLOW25PRIM_GLTF_BASE_COLOR48PRIM_GLTF_EMISSIVE46PRIM_GLTF_METALLIC_ROUGHNESS47PRIM_GLTF_NORMAL45PRIM_HEALTH52PRIM_MATERIAL2PRIM_NAME27PRIM_NORMAL37PRIM_OMEGA32PRIM_PHANTOM5PRIM_PHYSICS3PRIM_PHYSICS_SHAPE_TYPE30PRIM_POINT_LIGHT23PRIM_POS_LOCAL33PRIM_POSITION6PRIM_REFLECTION_PROBE44PRIM_RENDER_MATERIAL49PRIM_ROT_LOCAL29PRIM_ROTATION8PRIM_SCRIPTED_SIT_ONLY40PRIM_SIT_FLAGS50PRIM_SIT_TARGET41PRIM_SIZE7PRIM_SLICE35PRIM_SPECULAR36PRIM_TEMP_ON_REZ4PRIM_TEXGEN22PRIM_TEXT26PRIM_TEXTURE17PRIM_TYPE9
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- integer face — a face number or
ALL_SIDES - integer alpha_mode — PRIM_ALPHA_MODE_* flag1
- integer mask_cutoff — when 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 2552
When used with llSetLinkPrimitiveParamsFast
llGetLinkPrimitiveParams(LINK_THIS, [ PRIM_ALPHA_MODE, integer face ]);Returns the same values, in the same order.
| alpha_mode Flags | V | Description | Notes | ||||
|---|---|---|---|---|---|---|---|
PRIM_ALPHA_MODE_NONE | 0 | Render the diffuse texture as though the alpha channel were nonexistent | The 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_BLEND | 1 | Render 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_MASK | 2 | Render 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_EMISSIVE | 3 | Render 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
Section titled “Examples”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 ]);- Note that as with
PRIM_NORMALandPRIM_SPECULAR, setting a custom (i.e. notPRIM_ALPHA_MODE_BLEND) alpha mode on a prim faces causes the linkset to use the new prim accounting system. mask_cutoffis not used or stored unless the mode is set toPRIM_ALPHA_MODE_MASK.- To delete the material from
face, set thealpha_modetoPRIM_ALPHA_MODE_BLEND, in addition to clearingPRIM_NORMALandPRIM_SPECULAR - If
faceindicates a face that exists but does not contain a material, thePRIM_ALPHA_MODEreturn is ’[PRIM_ALPHA_MODE_BLEND, 0 ]’
See also
Section titled “See also”Functions
Section titled “Functions”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.
Footnotes
Section titled “Footnotes”-
Viewer
746d768339:llprimitive/llmaterial.h:40-48↩ -
Viewer
746d768339:llprimitive/llmaterial.h:147↩