-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #226 from ninjamike1211/main
feat: Directives/Shaders.Properties: add most of remaining directives
- Loading branch information
Showing
28 changed files
with
317 additions
and
9 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
src/content/docs/reference/Directives/Shaders.Properties/alphaTest.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
title: alphaTest | ||
description: alphaTest | ||
sidebar: | ||
label: alphaTest | ||
order: 1 | ||
--- | ||
|
||
### `alphaTest.<program>=<off|func ref>` | ||
|
||
#### Location: shaders.properties | ||
|
||
This directive is used to control the alpha test for cutout programs. For the compatibility profile the alpha test is applied automatically when using `gl_FragData` or `gl_FragColor`. For the newer syntax, only the reference value is passed through [`alphaTestRef`](/reference/uniforms/general/alphatestref) and the function must be implemented by the shader. | ||
|
||
Replace: | ||
- `<program>` with a gbuffers program name, including the dimension folder if relevant (e.g. `world0/composite2`). This does not work with Iris custom dimensions however. | ||
- `<off|func ref>` with `off` to disable alpha testing, or replace `func` with one of the following functions: `NEVER`, `LESS`, `EQUAL`, `LEQUAL`, `GREATER`, `NOTEQUAL`, `GEQUAL`, `GL_ALWAYS`. Replace `<ref>` with a reference value. The alpha value of the primary output will then be compared to this reference value using the function defined in `func`, and if it does not pass the value will be discarded (not written to the output buffer). |
16 changes: 16 additions & 0 deletions
16
src/content/docs/reference/Directives/Shaders.Properties/backFace.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
title: backFace | ||
description: backFace | ||
sidebar: | ||
label: backFace | ||
order: 1 | ||
--- | ||
|
||
### `backFace.solid=<true|false>` | ||
### `backFace.cutout=<true|false>` | ||
### `backFace.cutoutMipped=<true|false>` | ||
### `backFace.translucent=<true|false>` | ||
|
||
#### Location: shaders.properties | ||
|
||
Enables or disables back-face culling for each type of rendering. This culls geometry which is facing away from the camera, improving performance. Back-face culling is enabled by default. |
13 changes: 13 additions & 0 deletions
13
src/content/docs/reference/Directives/Shaders.Properties/beacon_beam_depth.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
title: beacon.beam.depth | ||
description: beacon.beam.depth | ||
sidebar: | ||
label: beacon.beam.depth | ||
order: 1 | ||
--- | ||
|
||
### `beacon.beam.depth=<true|false>` | ||
|
||
#### Location: shaders.properties | ||
|
||
Sets whether beacon beams write to the [depth buffer](/reference/buffers/depthtex). If `true`, the inner beacon beam will be treated like opaque geometry and only write toall depthtex buffers. This only applies to the opaque inner geometry of the beacon beam and not the outer translucent geometry. This setting is `false` by default. |
30 changes: 30 additions & 0 deletions
30
src/content/docs/reference/Directives/Shaders.Properties/blend.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
title: blend | ||
description: blend | ||
sidebar: | ||
label: blend | ||
order: 1 | ||
--- | ||
|
||
### `blend.<program>=<off|src dst srcA dstA>` | ||
### `blend.<program>.<buffer>=<off|src dst srcA dstA>` | ||
|
||
#### Location: shaders.properties | ||
|
||
Controls the alpha blending for a specific gbuffers program, and optionally per-buffer. | ||
|
||
Replace: | ||
- `<program>` with a gbuffers program | ||
- optionally `<buffer>` specifies the blending for a specific buffer (i.e. colortex5) | ||
|
||
Setting the value to `off` will disable alpha blending, otherwise the blending parameters are specified: | ||
- `src` is the source color multiplier | ||
- `dst` is the destination color multiplier | ||
- `srcA` is the source alpha multiplier | ||
- `dstA` is the destination alpha multiplier | ||
|
||
Each of the parameters should be filled with one of the following: `ZERO`, `ONE`, `SRC_COLOR`, `ONE_MINUS_SRC_COLOR`, `DST_COLOR`, `ONE_MINUS_DST_COLOR`, `SRC_ALPHA`, `ONE_MINUS_SRC_ALPHA`, `DST_ALPHA`, `ONE_MINUS_DST_ALPHA`, `SRC_ALPHA_SATURATE`. | ||
|
||
The default alpha blending parameters are: `SRC_ALPHA`, `ONE_MINUS_SRC_ALPHA`, `ONE`, `ONE_MINUS_SRC_ALPHA` respectively. | ||
|
||
More info on alpha blending can be found at the [Khronos Wiki](https://www.khronos.org/opengl/wiki/Blending) |
6 changes: 3 additions & 3 deletions
6
src/content/docs/reference/Directives/Shaders.Properties/buffer_flip.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
src/content/docs/reference/Directives/Shaders.Properties/buffer_size.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/content/docs/reference/Directives/Shaders.Properties/clouds.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
title: clouds | ||
description: clouds | ||
sidebar: | ||
label: clouds | ||
order: 1 | ||
--- | ||
|
||
### `clouds=<fast|fancy|off>` | ||
|
||
#### Location: shaders.properties | ||
|
||
Sets the clouds option, equivalent to the options in "Video Settings" however this setting overrides the user controlled setting if set. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/content/docs/reference/Directives/Shaders.Properties/frustum_culling.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
title: frustum.culling | ||
description: frustum.culling | ||
sidebar: | ||
label: frustum.culling | ||
order: 1 | ||
--- | ||
|
||
### `frustum.culling=<true|false>` | ||
|
||
#### Location: shaders.properties | ||
|
||
Enables or disables frustum culling, which culls geometry which is outside the view frustum (i.e. off screen). Frustum culling is enabled by default. |
13 changes: 13 additions & 0 deletions
13
src/content/docs/reference/Directives/Shaders.Properties/moon.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
title: moon | ||
description: moon | ||
sidebar: | ||
label: moon | ||
order: 1 | ||
--- | ||
|
||
### `moon=<true|false>` | ||
|
||
#### Location: shaders.properties | ||
|
||
Enables or disables rendering of the moon texture in gbuffers_skytextured. |
13 changes: 13 additions & 0 deletions
13
src/content/docs/reference/Directives/Shaders.Properties/oldHandLight.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
title: oldHandLight | ||
description: oldHandLight | ||
sidebar: | ||
label: oldHandLight | ||
order: 1 | ||
--- | ||
|
||
### `oldHandLight=<true|false>` | ||
|
||
#### Location: shaders.properties | ||
|
||
Sets a fallback for older shaders which don't support main and alt hands. If `oldHandLight` is set to `true`, [`heldBlockLightValue`](/reference/uniforms/general/heldblocklightvalue) will take the value of the highest light value. The default value is `true` due to legacy support, so it must be specifically disabled to have independent main and alt hand light values. |
13 changes: 13 additions & 0 deletions
13
src/content/docs/reference/Directives/Shaders.Properties/oldLighting.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
title: oldLighting | ||
description: oldLighting | ||
sidebar: | ||
label: oldLighting | ||
order: 1 | ||
--- | ||
|
||
### `oldLighting=<true|false>` | ||
|
||
#### Location: shaders.properties | ||
|
||
Enables the "old lighting", which applies a lighting multiplier in the color attribute based on the block's orientation (this is the same as vanilla). This value is set to `false` by default, as most shaders use their own lighting. |
13 changes: 13 additions & 0 deletions
13
...tent/docs/reference/Directives/Shaders.Properties/particles_before_deferred.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
title: particles.before.deferred | ||
description: particles.before.deferred | ||
sidebar: | ||
label: particles.before.deferred | ||
order: 1 | ||
--- | ||
|
||
### `particles.before.deferred=<true|false>` | ||
|
||
#### Location: shaders.properties | ||
|
||
The legacy version of [`particles.ordering`](/reference/directives/shadersproperties/particles_ordering) which is supported by Optifine. If set to `true` all particles will be rendered before the deferred pass, otherwise particles will be rendered after the deferred pass. This ordering is overwritten by [`particles.ordering`](/reference/directives/shadersproperties/particles_ordering) by Iris if both are present. |
17 changes: 17 additions & 0 deletions
17
src/content/docs/reference/Directives/Shaders.Properties/program_enabled.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
title: program.enabled | ||
description: program.enabled | ||
sidebar: | ||
label: program.enabled | ||
order: 1 | ||
--- | ||
|
||
### `program.<program>.enabled=<bool_expression>` | ||
|
||
#### Location: shaders.properties | ||
|
||
This directive can be used to disable a program based on shader options. | ||
|
||
Replace: | ||
- `<program>` with the program name, including the dimension folder if relevant (e.g. `world0/composite2`). | ||
- `<bool_expression>` with a boolean expression containing shader options. For example, `program.deferred.enabled=!BLOOM && (SSR || PARALLAX)`. `true` or `false` can also be used to outright enable/disable a program. |
13 changes: 13 additions & 0 deletions
13
src/content/docs/reference/Directives/Shaders.Properties/rain_depth.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
title: rain.depth | ||
description: rain.depth | ||
sidebar: | ||
label: rain.depth | ||
order: 1 | ||
--- | ||
|
||
### `rain.depth=<true|false>` | ||
|
||
#### Location: shaders.properties | ||
|
||
Sets whether rain/snow write to the [depth buffer](/reference/buffers/depthtex). If `true`, weather will be treated like translucent geometry and only write to `depthtex0`. This setting is `false` by default. |
18 changes: 18 additions & 0 deletions
18
src/content/docs/reference/Directives/Shaders.Properties/scale.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
title: scale | ||
description: scale | ||
sidebar: | ||
label: scale | ||
order: 1 | ||
--- | ||
|
||
### `scale.<program>=<scale|scale offsetX ofsetY>` | ||
|
||
#### Location: shaders.properties | ||
|
||
Defines a new viewport for a composite style program. This does not affect the resolution of the output buffer, it only impacts the vertex position attribute, therefore only changing the portion of the texture which is rendered to. The same effect can be achieved by manually modifying the position in the vertex stage, this directive simply offers a different interface for changing the viewport. | ||
|
||
Replace: | ||
- `<program>` with a composite style program (composite, deferred, prepare, etc.) | ||
- `<scale>` with a scaling factor from `0.0` to `1.0` which affects both axes | ||
- optionally `<offsetX>` and `<offsetY>` with the horizontal offset in each direction from `0.0` to `1.0` |
13 changes: 13 additions & 0 deletions
13
src/content/docs/reference/Directives/Shaders.Properties/separateAo.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
title: separateAo | ||
description: separateAo | ||
sidebar: | ||
label: separateAo | ||
order: 1 | ||
--- | ||
|
||
### `separateAo=<true|false>` | ||
|
||
#### Location: shaders.properties | ||
|
||
Normally a vanilla AO (ambient occlusion) value is stored in the rgb components of the color vertex attribute. Enabling `separateAo` moves this into the alpha channel of the color attribute. `separateAo` is disabled by default. |
13 changes: 13 additions & 0 deletions
13
src/content/docs/reference/Directives/Shaders.Properties/shadowBlockEntities.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
title: shadowBlockEntities | ||
description: shadowBlockEntities | ||
sidebar: | ||
label: shadowBlockEntities | ||
order: 1 | ||
--- | ||
|
||
### `shadowBlockEntities=<true|false>` | ||
|
||
#### Location: shaders.properties | ||
|
||
Sets whether block entities are rendered in the [`shadow pass`](/reference/programs/shadow). |
13 changes: 13 additions & 0 deletions
13
src/content/docs/reference/Directives/Shaders.Properties/shadowEntities.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
title: shadowEntities | ||
description: shadowEntities | ||
sidebar: | ||
label: shadowEntities | ||
order: 1 | ||
--- | ||
|
||
### `shadowEntities=<true|false>` | ||
|
||
#### Location: shaders.properties | ||
|
||
Sets whether entities are rendered in the [`shadow pass`](/reference/programs/shadow). |
File renamed without changes.
13 changes: 13 additions & 0 deletions
13
src/content/docs/reference/Directives/Shaders.Properties/shadowTerrain.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
title: shadowTerrain | ||
description: shadowTerrain | ||
sidebar: | ||
label: shadowTerrain | ||
order: 1 | ||
--- | ||
|
||
### `shadowTerrain=<true|false>` | ||
|
||
#### Location: shaders.properties | ||
|
||
Sets whether solid/cutout terrain is rendered in the [`shadow pass`](/reference/programs/shadow). |
13 changes: 13 additions & 0 deletions
13
src/content/docs/reference/Directives/Shaders.Properties/shadowTranslucent.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
title: shadowTranslucent | ||
description: shadowTranslucent | ||
sidebar: | ||
label: shadowTranslucent | ||
order: 1 | ||
--- | ||
|
||
### `shadowTranslucent=<true|false>` | ||
|
||
#### Location: shaders.properties | ||
|
||
Sets whether translucent terrain (e.g. water) is rendered in the [`shadow pass`](/reference/programs/shadow). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/content/docs/reference/Directives/Shaders.Properties/sun.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
title: sun | ||
description: sun | ||
sidebar: | ||
label: sun | ||
order: 1 | ||
--- | ||
|
||
### `sun=<true|false>` | ||
|
||
#### Location: shaders.properties | ||
|
||
Enables or disables rendering of the sun texture in gbuffers_skytextured. |
13 changes: 13 additions & 0 deletions
13
src/content/docs/reference/Directives/Shaders.Properties/underwaterOverlay.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
title: underwaterOverlay | ||
description: underwaterOverlay | ||
sidebar: | ||
label: underwaterOverlay | ||
order: 1 | ||
--- | ||
|
||
### `underwaterOverlay=<true|false>` | ||
|
||
#### Location: shaders.properties | ||
|
||
Enables or disables the water texture overlay when the player is underwater. |
13 changes: 13 additions & 0 deletions
13
src/content/docs/reference/Directives/Shaders.Properties/vignette.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
title: vignette | ||
description: vignette | ||
sidebar: | ||
label: vignette | ||
order: 1 | ||
--- | ||
|
||
### `vignette=<true|false>` | ||
|
||
#### Location: shaders.properties | ||
|
||
Enables or disables rendering of the vignette overlay, an effect which darkens the edge of the screen slightly. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.