# PRIM_ALPHA_MODE

*LSL constant*

```lsl
integer PRIM_ALPHA_MODE = 38;
```

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.

Constant groups: [PrimParam](/constants/groups/PrimParam/), [PrimParamGet](/constants/groups/PrimParamGet/)

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

## Examples

<details open>
<summary>Example 1</summary>

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

</details>

## Notes

- Note that as with [PRIM_NORMAL](/constants/PRIM_NORMAL/) and [PRIM_SPECULAR](/constants/PRIM_SPECULAR/), setting a custom (i.e. not [PRIM_ALPHA_MODE_BLEND](/constants/PRIM_ALPHA_MODE_BLEND/)) alpha mode on a prim faces causes the linkset to use the [new prim accounting system](http://community.secondlife.com/t5/English-Knowledge-Base/Calculating-land-impact/ta-p/974163).
- `mask_cutoff` is not used or stored unless the mode is set to [PRIM_ALPHA_MODE_MASK](/constants/PRIM_ALPHA_MODE_MASK/).
- To delete the material from `face`, set the `alpha_mode` to [PRIM_ALPHA_MODE_BLEND](/constants/PRIM_ALPHA_MODE_BLEND/), in addition to clearing [PRIM_NORMAL](/constants/PRIM_NORMAL/) and [PRIM_SPECULAR](/constants/PRIM_SPECULAR/)
- If `face` indicates a face that exists but does not contain a material, the [PRIM_ALPHA_MODE](/constants/PRIM_ALPHA_MODE/) return is '\[ [PRIM_ALPHA_MODE_BLEND](/constants/PRIM_ALPHA_MODE_BLEND/), 0 \]'

## See also

### Functions

- [llGetPrimitiveParams](/functions/llGetPrimitiveParams/)
- [llGetLinkPrimitiveParams](/functions/llGetLinkPrimitiveParams/)
- [llSetLinkPrimitiveParamsFast](/functions/llSetLinkPrimitiveParamsFast/)

---

*Source: [PRIM ALPHA MODE](https://wiki.secondlife.com/wiki/PRIM_ALPHA_MODE) on the Second Life Wiki. Content from the Second Life Wiki article PRIM ALPHA MODE (revision 1194678, 2015-01-23), CC BY-SA 3.0.*

---

From lsl.dev: https://lsl.dev/constants/PRIM_ALPHA_MODE/
