2022-10-03 00:10:54 +00:00
|
|
|
# Materials: Commands {#mat_commands}
|
|
|
|
## alphagen
|
2022-10-17 20:33:16 +00:00
|
|
|
### Syntax
|
2022-10-03 00:10:54 +00:00
|
|
|
|
|
|
|
**alphaGen <func>**
|
|
|
|
|
2022-10-17 20:33:16 +00:00
|
|
|
### Overview
|
2022-10-03 00:10:54 +00:00
|
|
|
|
|
|
|
The alpha channel can be specified like the [rgb
|
|
|
|
channels](rgbGen). If not specified, it
|
|
|
|
defaults to 1.0.
|
|
|
|
|
|
|
|
### Functions {#functions}
|
|
|
|
|
|
|
|
#### portal {#portal}
|
|
|
|
|
|
|
|
This rendering stage keyword is used in conjunction with the
|
|
|
|
[surfaceparm](surfaceparm) keyword
|
|
|
|
portal. The function accomplishes the "fade" that causes the scene in
|
|
|
|
the portal to fade from view. Specifically, it means "Generate alpha
|
|
|
|
values based on the distance from the viewer to the portal."
|
|
|
|
|
|
|
|
Use `alphaGen portal` on the last rendering pass.
|