Documentation: Various fixes and improvements that the wiki converter didn't handle
This commit is contained in:
parent
061cdbd257
commit
225039f71f
17 changed files with 98 additions and 86 deletions
|
@ -9,8 +9,8 @@
|
|||
Determines the alpha test function used when rendering this surface.
|
||||
|
||||
Valid values are **GT0**, **LT128**, and **GE128**. These correspond to
|
||||
**"GREATER THAN 0"**, **"LESS THAN 128"**, and **"GREATER THAN OR EQUAL
|
||||
TO 128"**.
|
||||
**GREATER THAN 0**, **LESS THAN 128**, and **GREATER THAN OR EQUAL
|
||||
TO 128**.
|
||||
|
||||
This function is used when determining if a pixel should be written to
|
||||
the frame-buffer. For example, if **GT0** is specified, the only the
|
||||
|
@ -18,13 +18,12 @@ portions of the texture map with corresponding alpha values greater than
|
|||
zero will be written to the framebuffer. **By default alpha testing is
|
||||
disabled.**
|
||||
|
||||
Both alpha testing and normal [alpha
|
||||
blending](blendFunc) can be used to get
|
||||
Both alpha testing and normal [alpha blending](blendfunc.md) can be used to get
|
||||
textures that have see-through parts. The difference is that
|
||||
**alphaFunc** is an all-or-nothing test, while blending smoothly blends
|
||||
between opaque and translucent at pixel edges.
|
||||
|
||||
Alpha test can also be used with
|
||||
[depthWrite](depthWrite), allowing other
|
||||
[depthWrite](depthwrite.md), allowing other
|
||||
effects to be conditionally layered on top of just the opaque pixels by
|
||||
setting [depthFunc](depthFunc) to equal.
|
||||
setting [depthFunc](depthfunc.md) to equal.
|
|
@ -6,8 +6,7 @@
|
|||
|
||||
### Overview
|
||||
|
||||
The alpha channel can be specified like the [rgb
|
||||
channels](rgbGen). If not specified, it
|
||||
The alpha channel can be specified like the [rgb channels](rgbgen.md). If not specified, it
|
||||
defaults to 1.0.
|
||||
|
||||
### Functions {#functions}
|
||||
|
@ -15,7 +14,7 @@ defaults to 1.0.
|
|||
#### portal {#portal}
|
||||
|
||||
This rendering stage keyword is used in conjunction with the
|
||||
[surfaceparm](surfaceparm) keyword
|
||||
[surfaceparm](surfaceparm.md) 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."
|
||||
|
|
|
@ -23,10 +23,10 @@ It accepts the standard **wave** functions of the type: **sin**,
|
|||
**triangle**, **square**, **sawtooth** or **inversesawtooth**.
|
||||
|
||||
The "div" parameter is used to control the wave "spread" - a value equal
|
||||
to the [tessSize](vmap_tessSize) of the
|
||||
to the [tessSize](vmap_tesssize.md) of the
|
||||
surface is a good default value.
|
||||
|
||||
#### normal <siv> <func> <base> <amplitude ~0.1-~0.5> <frequency ~1.0-~4.0> {#normal_amplitude_0.1_0.5_frequency_1.0_4.0}
|
||||
#### normal <siv> <func> <base> <amplitude> <frequency> {#normal_amplitude}
|
||||
|
||||
This deformation affects the normals of a vertex without actually moving
|
||||
it, which will effect later material options like lighting and
|
||||
|
@ -43,14 +43,14 @@ rain, flags.
|
|||
This forces a bulge to move along the given s and t directions. Designed
|
||||
for use on curved pipes.
|
||||
|
||||
#### move<x> <y> <z> <func> <base> <amplitude> <phase> <freq> {#move}
|
||||
#### move <x> <y> <z> <func> <base> <amplitude> <phase> <freq> {#move}
|
||||
|
||||
This keyword is used to make a brush, curve patch or model appear to
|
||||
move together as a unit. The **<x>** **<y>** and **<z>** values are the
|
||||
move together as a unit. The **x** **y** and **z** values are the
|
||||
distance and direction in game units the object appears to move relative
|
||||
to it's point of origin in the map.
|
||||
|
||||
The **<func> <base> <amplitude> <phase>** and **<freq>** values are the
|
||||
The **func base amplitude phase** and **freq** values are the
|
||||
same as found in other wave form manipulations.
|
||||
|
||||
The product of the function modifies the values x, y, and z.Therefore,
|
||||
|
@ -101,9 +101,9 @@ smaller wave forms occurring in a given area. Larger values create a
|
|||
lesser density of waves, or otherwise put, the appearance of larger
|
||||
waves. To look correct this value should closely correspond to the value
|
||||
(in pixels) set for
|
||||
[tessSize](vmap_tessSize) of the texture.
|
||||
[tessSize](vmap_tesssize.md) of the texture.
|
||||
A value of 100.0 is a good default value (which means your
|
||||
[tessSize](vmap_tessSize) should be close
|
||||
[tessSize](vmap_tesssize.md) should be close
|
||||
to that for things tolook "wavelike").
|
||||
|
||||
#### <func> {#section_1}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
### Overview
|
||||
|
||||
By default, writes to the depth buffer when
|
||||
[depthFunc](depthFunc) passes will happen
|
||||
[depthFunc](depthfunc.md) passes will happen
|
||||
for opaque surfaces and not for translucent surfaces.
|
||||
|
||||
Blended surfaces can have the depth writes forced with this function.
|
|
@ -7,15 +7,15 @@
|
|||
### Overview
|
||||
|
||||
**Note**: you must also specify "surfaceparm fog" to cause
|
||||
[vmap](vmap) to identify the surfaces inside the volume.
|
||||
[vmap](vmap.md) to identify the surfaces inside the volume.
|
||||
Fogparms only describes how to render the fog on the surfaces.
|
||||
|
||||
**<red value> <green value> <blue value>** These are normalized values.
|
||||
**red value, green value, blue value**: These are normalized values.
|
||||
To obtain the values that define fog color divide the desired color's
|
||||
Red, Green and Blue values by 255 to obtain three normalized numbers
|
||||
within the 0.0 to 1.0 range.
|
||||
|
||||
**<distance toopaque>** This is the distance, in game units, until the
|
||||
**distance to opaque**: This is the distance, in game units, until the
|
||||
fog becomes totally opaque, as measured from the point of view of the
|
||||
observer. By making the height of the fog brush shorter than the
|
||||
distance to opaque, the apparent density of the fog can be reduced
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
### Overview
|
||||
|
||||
Similar to [vmap_surfaceModel (Material
|
||||
Command)](vmap_surfaceModel), however
|
||||
Similar to [vmap_surfaceModel (vmap_surfacemodel.md), however
|
||||
it'll place models at runtime. The density can be controlled via the
|
||||
cvar `r_clutter_density`.
|
|
@ -9,17 +9,17 @@
|
|||
The texture is essentially a fullbright overlay on top of the
|
||||
diffuse/albedomap.
|
||||
|
||||
Not all [Shaders](Shaders) support them. In some, like the
|
||||
[unlit](unlit_(Shader)) shader, the
|
||||
[diffusemap](diffusemap) is always
|
||||
Not all [Shaders](Shaders.md) support them. In some, like the
|
||||
[unlit](unlit.md) shader, the
|
||||
[diffusemap](diffusemap.md) is always
|
||||
fullbright.
|
||||
|
||||
### See also {#see_also}
|
||||
|
||||
- [diffusemap](diffusemap)
|
||||
- [normalmap](normalmap)
|
||||
- [specularmap](specularmap)
|
||||
- [uppermap](uppermap)
|
||||
- [lowermap](lowermap)
|
||||
- [reflectmask](reflectmask)
|
||||
- [reflectcube](reflectcube)
|
||||
- [diffusemap](diffusemap.md)
|
||||
- [normalmap](normalmap.md)
|
||||
- [specularmap](specularmap.md)
|
||||
- [uppermap](uppermap.md)
|
||||
- [lowermap](lowermap.md)
|
||||
- [reflectmask](reflectmask.md)
|
||||
- [reflectcube](reflectcube.md)
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
### Overview
|
||||
|
||||
This implies [noPicMip](noPicMip), but
|
||||
This implies [noPicMip](nopicmip.md), but
|
||||
also prevents the generation of any lower resolution mipmaps for use by
|
||||
the 3d card. This will cause the texture to alias when it gets smaller,
|
||||
but there are some cases where you would rather have this than a blurry
|
||||
|
|
|
@ -18,10 +18,10 @@ Check out our [Normal mapping guide](Normal_mapping_guide).
|
|||
|
||||
### See also {#see_also}
|
||||
|
||||
- [diffusemap](diffusemap)
|
||||
- [specularmap](specularmap)
|
||||
- [fullbrightmap](fullbrightmap)
|
||||
- [uppermap](uppermap)
|
||||
- [lowermap](lowermap)
|
||||
- [reflectmask](reflectmask)
|
||||
- [reflectcube](reflectcube)
|
||||
- [diffusemap](diffusemap.md)
|
||||
- [specularmap](specularmap.md)
|
||||
- [fullbrightmap](fullbrightmap.md)
|
||||
- [uppermap](uppermap.md)
|
||||
- [lowermap](lowermap.md)
|
||||
- [reflectmask](reflectmask.md)
|
||||
- [reflectcube](reflectcube.md)
|
|
@ -4,11 +4,11 @@
|
|||
material. It also accepts arguments that will recompile a shader with
|
||||
certain permutations. This is kinda ugly,
|
||||
|
||||
Starting in [The Wastes](The_Wastes) 1.2, there are the
|
||||
Starting in **The Wastes 1.2**, there are the
|
||||
following shader programs available to you:
|
||||
|
||||
- program [unlit](unlit_(Shader))
|
||||
- program [lightmapped](lightmapped_(Shader))
|
||||
- program [vertexlit](vertexlit_(Shader))
|
||||
- program [water](water_(Shader))
|
||||
- program [refract](refract_(Shader))
|
||||
- program [unlit](unlit.md)
|
||||
- program [lightmapped](lightmapped.md)
|
||||
- program [vertexlit](vertexlit.md)
|
||||
- program [water](water.md)
|
||||
- program [refract](refract.md)
|
|
@ -11,10 +11,10 @@ will pass the nearest in-world cubemap instead.
|
|||
|
||||
### See also {#see_also}
|
||||
|
||||
- [diffusemap](diffusemap)
|
||||
- [normalmap](normalmap)
|
||||
- [specularmap](specularmap)
|
||||
- [fullbrightmap](fullbrightmap)
|
||||
- [uppermap](uppermap)
|
||||
- [lowermap](lowermap)
|
||||
- [reflectmask](reflectmask)
|
||||
- [diffusemap](diffusemap.md)
|
||||
- [normalmap](normalmap.md)
|
||||
- [specularmap](specularmap.md)
|
||||
- [fullbrightmap](fullbrightmap.md)
|
||||
- [uppermap](uppermap.md)
|
||||
- [lowermap](lowermap.md)
|
||||
- [reflectmask](reflectmask.md)
|
|
@ -8,18 +8,18 @@
|
|||
|
||||
Defines a texture that specifies which parts of a material will reveal a
|
||||
reflective material, such as a
|
||||
[cubemap](reflectcube). This applies to
|
||||
[cubemap](reflectcube.md). This applies to
|
||||
standard FTEQW. In Nuclide the reflectmask is currently unused with the
|
||||
included shaders. If you want to apply reflectivity to your materials,
|
||||
use the alpha channel of your
|
||||
[normalmap](normalmap) instead.
|
||||
[normalmap](normalmap.md) instead.
|
||||
|
||||
### See also {#see_also}
|
||||
|
||||
- [diffusemap](diffusemap)
|
||||
- [normalmap](normalmap)
|
||||
- [specularmap](specularmap)
|
||||
- [fullbrightmap](fullbrightmap)
|
||||
- [uppermap](uppermap)
|
||||
- [lowermap](lowermap)
|
||||
- [reflectcube](reflectcube)
|
||||
- [diffusemap](diffusemap.md)
|
||||
- [normalmap](normalmap.md)
|
||||
- [specularmap](specularmap.md)
|
||||
- [fullbrightmap](fullbrightmap.md)
|
||||
- [uppermap](uppermap.md)
|
||||
- [lowermap](lowermap.md)
|
||||
- [reflectcube](reflectcube.md)
|
|
@ -13,20 +13,20 @@ to use for color, intensity etc.
|
|||
The renderer will take it into account only if you do not supply any
|
||||
Stages in the material.
|
||||
|
||||
**<farbox>** Specifies a set of files to use as an environment box
|
||||
**farbox**: Specifies a set of files to use as an environment box
|
||||
behind all cloudlayers. Specify "-" for no farbox, or a file base name.
|
||||
A base name of "env/test" would look for files "env/test_rt.tga",
|
||||
"env/test_lf.tga", "env/test_ft.tga", "env/test_bk.tga",
|
||||
"env/test_up.tga", "env/test_dn.tga" to use as the right / left / front
|
||||
/ back / up / down sides.
|
||||
|
||||
**<cloudheight>** controls apparent curvature of the cloud layers -
|
||||
**cloudheight**: controls apparent curvature of the cloud layers -
|
||||
lower numbers mean more curvature (and thus more distortion at the
|
||||
horizons). Higher height values create "flatter" skies with less horizon
|
||||
distortion. Think of height as the radius of a sphere on which the
|
||||
clouds are mapped. Good ranges are 64 to 256. The default value is 128.
|
||||
|
||||
**<nearbox>** Specified as farbox, to be alpha blended ontop of the
|
||||
**nearbox**: Specified as farbox, to be alpha blended ontop of the
|
||||
clouds. This has not be tested in a long time, so it probably doesn't
|
||||
actually work. Set to "-" to ignore.
|
||||
|
||||
|
|
|
@ -13,10 +13,10 @@ texture it for other purposes, too.
|
|||
|
||||
### See also {#see_also}
|
||||
|
||||
- [diffusemap](diffusemap)
|
||||
- [normalmap](normalmap)
|
||||
- [fullbrightmap](fullbrightmap)
|
||||
- [uppermap](uppermap)
|
||||
- [lowermap](lowermap)
|
||||
- [reflectmask](reflectmask)
|
||||
- [reflectcube](reflectcube)
|
||||
- [diffusemap](diffusemap.md)
|
||||
- [normalmap](normalmap.md)
|
||||
- [fullbrightmap](fullbrightmap.md)
|
||||
- [uppermap](uppermap.md)
|
||||
- [lowermap](lowermap.md)
|
||||
- [reflectmask](reflectmask.md)
|
||||
- [reflectcube](reflectcube.md)
|
|
@ -8,9 +8,9 @@ by the renderer. A few keywords will only apply to any one of them.
|
|||
All surfaceparm keywords are preceded by the word surfaceparm as
|
||||
follows:
|
||||
|
||||
:
|
||||
|
||||
: surfaceparm **fog**
|
||||
```
|
||||
surfaceparm **fog**
|
||||
```
|
||||
|
||||
### Behaviour Keywords {#behaviour_keywords}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
## tcmod
|
||||
### Syntax
|
||||
|
||||
**tcMod <func> <…>**
|
||||
**tcMod <func> [...]**
|
||||
|
||||
### Overview
|
||||
|
||||
|
@ -26,7 +26,7 @@ specified. In otherwords, if you see:
|
|||
tcMod scroll 1 1
|
||||
```
|
||||
|
||||
Then the texture coordinates will be **scaled then**scrolled'''.
|
||||
Then the texture coordinates will be **scaled** then **scrolled**.
|
||||
|
||||
### Functions {#functions}
|
||||
|
||||
|
@ -81,20 +81,20 @@ Stretches the texture coordinates with the given function. Stretching is
|
|||
defined as stretching the texture coordinate away from the center of the
|
||||
polygon and then compressing it towards the center of the polygon.
|
||||
|
||||
**<base>**: A base value of one is the original dimension of the texture
|
||||
**base**: A base value of one is the original dimension of the texture
|
||||
when it reaches the stretch stage. Inserting other '''values positive or
|
||||
negative in this variable will produce unknown effects.
|
||||
|
||||
**<amplitude>**: This is the measurement of distance the texture will
|
||||
**amplitude**: This is the measurement of distance the texture will
|
||||
stretch from the base size. It is measured, like scroll, in textures. A
|
||||
value of 1 here will double the size of the texture at its peak.
|
||||
|
||||
**<phase>**: See the explanation for phase under the deform vertexes
|
||||
**phase**: See the explanation for phase under the deform vertexes
|
||||
keyword.
|
||||
|
||||
**<frequency>**: this is wave peaks per second.
|
||||
**frequency**: this is wave peaks per second.
|
||||
|
||||
**<func>**:
|
||||
**func**:
|
||||
|
||||
- **Sin**: the texture expands smoothly to its peak dimension and then
|
||||
shrinks smoothly to its valley dimension in a flowing manner.
|
||||
|
@ -122,13 +122,13 @@ forth churning and swirling effect on the texture.
|
|||
|
||||
The parameters for this are defined as follows:
|
||||
|
||||
- **<base>**: Currently undefined.
|
||||
- **<amplitude>**: This is essentially the intensity of the
|
||||
- **base**: Currently undefined.
|
||||
- **amplitude**: This is essentially the intensity of the
|
||||
disturbance or twisting and squiggling of the texture.
|
||||
- **<phase>**: See the explanation for phase under the
|
||||
- **phase**: See the explanation for phase under the
|
||||
[deformvertexes](DeformVertexes)
|
||||
keyword.
|
||||
- **<freq>**: Frequency. This value is expressed as repetitions or
|
||||
- **freq**: Frequency. This value is expressed as repetitions or
|
||||
cycles of the wave per second. A value of one would cycle once per
|
||||
second. A value of 10 would cycle 10 times per second. A value of
|
||||
0.1 would cycle once every 10 seconds.
|
15
Documentation/XR.md
Normal file
15
Documentation/XR.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
# The XR Subsystem
|
||||
|
||||
To support XR (which is the support for Virtual, Augmented or Mixed Reality output) we have a few routines that help deal with this.
|
||||
|
||||
## Classes related to XR
|
||||
|
||||
We have 3 NSXRInput class instances per NSClient class, which itself belongs to a NSXRSpace.
|
||||
|
||||
### Head
|
||||
|
||||
The head is an NSXRInput of type XR_INPUT_HEAD. Yes, a head is just like any other XR compatible controller. It has a gyro and it potentially has buttons the user can press.
|
||||
|
||||
### Hands
|
||||
|
||||
We have two hands available, that will identify themselves as XR_INPUT_LEFT or XR_INPUT_RIGHT respectively. These are your primary tools for interacting with the 3D world.
|
Loading…
Reference in a new issue