2024-06-22 07:24:13 +00:00
|
|
|
# Material Command List {#mat_commands}
|
|
|
|
|
2024-12-05 03:04:56 +00:00
|
|
|
## cull {#cull}
|
2024-06-22 07:24:13 +00:00
|
|
|
|
2024-12-05 03:04:56 +00:00
|
|
|
### Syntax
|
2022-10-03 00:10:54 +00:00
|
|
|
|
2024-12-05 03:04:56 +00:00
|
|
|
**cull \<side\>**
|
2022-10-03 00:10:54 +00:00
|
|
|
|
2024-12-05 03:04:56 +00:00
|
|
|
### Overview
|
2022-10-03 00:10:54 +00:00
|
|
|
|
|
|
|
Every surface of a polygon has two sides, a front and a back. Typically,
|
|
|
|
we only see the front or "out" side. For example, a solid block you only
|
|
|
|
show the front side. In many applications we see both. For example, in
|
|
|
|
water, you can see both front and a back. The same is true for things
|
|
|
|
like grates and screens.
|
|
|
|
|
|
|
|
To "cull" means to remove. The value parameter determines the type of
|
|
|
|
face culling to apply. The default value is cull front if this keyword
|
|
|
|
is not specified. However for items that should be inverted then the
|
|
|
|
value back should be used. To disable culling, the value disable or none
|
|
|
|
should be used. Only one cull instruction can be set for the material.
|
|
|
|
|
2024-12-05 03:04:56 +00:00
|
|
|
### Sides {#cull_sides}
|
2022-10-03 00:10:54 +00:00
|
|
|
|
2024-12-05 03:04:56 +00:00
|
|
|
#### front {#cull_front}
|
2022-10-03 00:10:54 +00:00
|
|
|
|
|
|
|
**This is the default value.** The front or "outside" of the polygon is
|
|
|
|
not drawn in the world. It is used if the keyword `"cull "` appears in
|
2024-12-05 03:04:56 +00:00
|
|
|
the content instructions without a \<side\> value or if the keyword cull
|
2022-10-03 00:10:54 +00:00
|
|
|
does not appear at all in the shader.
|
|
|
|
|
2024-12-05 03:04:56 +00:00
|
|
|
#### back {#cull_back}
|
2022-10-03 00:10:54 +00:00
|
|
|
|
|
|
|
Cull back removes the back or "inside" of a polygon from being drawn in
|
|
|
|
the world.
|
|
|
|
|
2024-12-05 03:04:56 +00:00
|
|
|
#### none {#cull_none}
|
2022-10-03 00:10:54 +00:00
|
|
|
|
|
|
|
Neither side of the polygon is removed. Both sides are drawn in the
|
|
|
|
game. Very useful for making panels or barriers that have no depth, such
|
|
|
|
as grates, screens, metal wire fences and so on and for liquid volumes
|
|
|
|
that the player can see from within. Also used for energy fields,
|
|
|
|
sprites, and weapon effects (e.g. plasma).
|
|
|
|
|
|
|
|
**Design Notes:** For things like grates and screens, put the texture
|
|
|
|
with the cull none property on one face only. On the other faces, use a
|
2024-12-05 03:04:56 +00:00
|
|
|
non-drawing texture.
|