From 225039f71f66d61638d26edd804920fa92059e0c Mon Sep 17 00:00:00 2001 From: Marco Cawthorne Date: Mon, 21 Aug 2023 08:39:01 -0700 Subject: [PATCH] Documentation: Various fixes and improvements that the wiki converter didn't handle --- Documentation/Materials/commands/alphafunc.md | 11 +++++----- Documentation/Materials/commands/alphagen.md | 5 ++--- .../Materials/commands/deformvertexes.md | 14 ++++++------ .../Materials/commands/depthwrite.md | 2 +- Documentation/Materials/commands/fogparms.md | 6 ++--- .../Materials/commands/fte_clutter.md | 3 +-- .../Materials/commands/fullbrightmap.md | 20 ++++++++--------- Documentation/Materials/commands/nomipmaps.md | 2 +- Documentation/Materials/commands/normalmap.md | 14 ++++++------ Documentation/Materials/commands/program.md | 12 +++++----- .../Materials/commands/reflectcube.md | 14 ++++++------ .../Materials/commands/reflectmask.md | 18 +++++++-------- Documentation/Materials/commands/skyparms.md | 6 ++--- .../Materials/commands/specularmap.md | 14 ++++++------ .../Materials/commands/surfaceparm.md | 6 ++--- Documentation/Materials/commands/tcmod.md | 22 +++++++++---------- Documentation/XR.md | 15 +++++++++++++ 17 files changed, 98 insertions(+), 86 deletions(-) create mode 100644 Documentation/XR.md diff --git a/Documentation/Materials/commands/alphafunc.md b/Documentation/Materials/commands/alphafunc.md index c0d7ab2f..0534bbda 100644 --- a/Documentation/Materials/commands/alphafunc.md +++ b/Documentation/Materials/commands/alphafunc.md @@ -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. \ No newline at end of file +setting [depthFunc](depthfunc.md) to equal. \ No newline at end of file diff --git a/Documentation/Materials/commands/alphagen.md b/Documentation/Materials/commands/alphagen.md index 016c8f3b..308b9e5f 100644 --- a/Documentation/Materials/commands/alphagen.md +++ b/Documentation/Materials/commands/alphagen.md @@ -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." diff --git a/Documentation/Materials/commands/deformvertexes.md b/Documentation/Materials/commands/deformvertexes.md index d0a5cc5a..547d3678 100644 --- a/Documentation/Materials/commands/deformvertexes.md +++ b/Documentation/Materials/commands/deformvertexes.md @@ -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 <amplitude ~0.1-~0.5> <frequency ~1.0-~4.0> {#normal_amplitude_0.1_0.5_frequency_1.0_4.0} +#### normal {#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 {#move} +#### move {#move} This keyword is used to make a brush, curve patch or model appear to -move together as a unit. The **** **** and **** 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 ** ** and **** 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"). #### {#section_1} diff --git a/Documentation/Materials/commands/depthwrite.md b/Documentation/Materials/commands/depthwrite.md index cd23626b..bec604ed 100644 --- a/Documentation/Materials/commands/depthwrite.md +++ b/Documentation/Materials/commands/depthwrite.md @@ -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. \ No newline at end of file diff --git a/Documentation/Materials/commands/fogparms.md b/Documentation/Materials/commands/fogparms.md index b9774821..a4219f07 100644 --- a/Documentation/Materials/commands/fogparms.md +++ b/Documentation/Materials/commands/fogparms.md @@ -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. -** ** 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. -**** 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 diff --git a/Documentation/Materials/commands/fte_clutter.md b/Documentation/Materials/commands/fte_clutter.md index f4753a0c..15bb526b 100644 --- a/Documentation/Materials/commands/fte_clutter.md +++ b/Documentation/Materials/commands/fte_clutter.md @@ -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`. \ No newline at end of file diff --git a/Documentation/Materials/commands/fullbrightmap.md b/Documentation/Materials/commands/fullbrightmap.md index fa4dcd3f..1a511558 100644 --- a/Documentation/Materials/commands/fullbrightmap.md +++ b/Documentation/Materials/commands/fullbrightmap.md @@ -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) \ No newline at end of file +- [diffusemap](diffusemap.md) +- [normalmap](normalmap.md) +- [specularmap](specularmap.md) +- [uppermap](uppermap.md) +- [lowermap](lowermap.md) +- [reflectmask](reflectmask.md) +- [reflectcube](reflectcube.md) \ No newline at end of file diff --git a/Documentation/Materials/commands/nomipmaps.md b/Documentation/Materials/commands/nomipmaps.md index d81bc2b4..9d34d7ed 100644 --- a/Documentation/Materials/commands/nomipmaps.md +++ b/Documentation/Materials/commands/nomipmaps.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 diff --git a/Documentation/Materials/commands/normalmap.md b/Documentation/Materials/commands/normalmap.md index 105622f8..92d3ae0c 100644 --- a/Documentation/Materials/commands/normalmap.md +++ b/Documentation/Materials/commands/normalmap.md @@ -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) \ No newline at end of file +- [diffusemap](diffusemap.md) +- [specularmap](specularmap.md) +- [fullbrightmap](fullbrightmap.md) +- [uppermap](uppermap.md) +- [lowermap](lowermap.md) +- [reflectmask](reflectmask.md) +- [reflectcube](reflectcube.md) \ No newline at end of file diff --git a/Documentation/Materials/commands/program.md b/Documentation/Materials/commands/program.md index 352273a5..67a0bb44 100644 --- a/Documentation/Materials/commands/program.md +++ b/Documentation/Materials/commands/program.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)) \ No newline at end of file +- program [unlit](unlit.md) +- program [lightmapped](lightmapped.md) +- program [vertexlit](vertexlit.md) +- program [water](water.md) +- program [refract](refract.md) \ No newline at end of file diff --git a/Documentation/Materials/commands/reflectcube.md b/Documentation/Materials/commands/reflectcube.md index 7e2bd2f2..2a72cb24 100644 --- a/Documentation/Materials/commands/reflectcube.md +++ b/Documentation/Materials/commands/reflectcube.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) \ No newline at end of file +- [diffusemap](diffusemap.md) +- [normalmap](normalmap.md) +- [specularmap](specularmap.md) +- [fullbrightmap](fullbrightmap.md) +- [uppermap](uppermap.md) +- [lowermap](lowermap.md) +- [reflectmask](reflectmask.md) \ No newline at end of file diff --git a/Documentation/Materials/commands/reflectmask.md b/Documentation/Materials/commands/reflectmask.md index e9561c60..66198564 100644 --- a/Documentation/Materials/commands/reflectmask.md +++ b/Documentation/Materials/commands/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) \ No newline at end of file +- [diffusemap](diffusemap.md) +- [normalmap](normalmap.md) +- [specularmap](specularmap.md) +- [fullbrightmap](fullbrightmap.md) +- [uppermap](uppermap.md) +- [lowermap](lowermap.md) +- [reflectcube](reflectcube.md) \ No newline at end of file diff --git a/Documentation/Materials/commands/skyparms.md b/Documentation/Materials/commands/skyparms.md index 7b521f1f..29c09bf2 100644 --- a/Documentation/Materials/commands/skyparms.md +++ b/Documentation/Materials/commands/skyparms.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. -**** 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. -**** 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. -**** 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. diff --git a/Documentation/Materials/commands/specularmap.md b/Documentation/Materials/commands/specularmap.md index 2d359854..888688a2 100644 --- a/Documentation/Materials/commands/specularmap.md +++ b/Documentation/Materials/commands/specularmap.md @@ -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) \ No newline at end of file +- [diffusemap](diffusemap.md) +- [normalmap](normalmap.md) +- [fullbrightmap](fullbrightmap.md) +- [uppermap](uppermap.md) +- [lowermap](lowermap.md) +- [reflectmask](reflectmask.md) +- [reflectcube](reflectcube.md) \ No newline at end of file diff --git a/Documentation/Materials/commands/surfaceparm.md b/Documentation/Materials/commands/surfaceparm.md index 4a54042d..519dabff 100644 --- a/Documentation/Materials/commands/surfaceparm.md +++ b/Documentation/Materials/commands/surfaceparm.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} diff --git a/Documentation/Materials/commands/tcmod.md b/Documentation/Materials/commands/tcmod.md index 0d21de44..cad896c6 100644 --- a/Documentation/Materials/commands/tcmod.md +++ b/Documentation/Materials/commands/tcmod.md @@ -2,7 +2,7 @@ ## tcmod ### Syntax -**tcMod <…>** +**tcMod [...]** ### 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. -****: 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. -****: 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. -****: See the explanation for phase under the deform vertexes +**phase**: See the explanation for phase under the deform vertexes keyword. -****: this is wave peaks per second. +**frequency**: this is wave peaks per second. -****: +**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: -- ****: Currently undefined. -- ****: 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. -- ****: See the explanation for phase under the +- **phase**: See the explanation for phase under the [deformvertexes](DeformVertexes) keyword. -- ****: 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. \ No newline at end of file diff --git a/Documentation/XR.md b/Documentation/XR.md new file mode 100644 index 00000000..9a275c4f --- /dev/null +++ b/Documentation/XR.md @@ -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. \ No newline at end of file