-
Notifications
You must be signed in to change notification settings - Fork 9
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 #229 from ninjamike1211/main
feat: Directives/Constants: Added remaining const directives
- Loading branch information
Showing
17 changed files
with
185 additions
and
3 deletions.
There are no files selected for viewing
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
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/Constants/ambientOcclusionLevel.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: ambientOcclusionLevel | ||
description: ambientOcclusionLevel | ||
sidebar: | ||
label: ambientOcclusionLevel | ||
order: 3 | ||
--- | ||
|
||
### `const float ambientOcclusionLevel = 1.0;` | ||
|
||
#### Location: any glsl file | ||
|
||
Sets the amount of vanilla ambient occlusion (AO) that is applied through the color vertex attribute. The default value is `1.0` (vanilla level), setting it to `0.0` will disable vanilla AO. Valid range for this value is `[0.0 - 1.0]`. |
13 changes: 13 additions & 0 deletions
13
src/content/docs/reference/Directives/Constants/centerDepthHalflife.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: centerDepthHalflife | ||
description: centerDepthHalflife | ||
sidebar: | ||
label: centerDepthHalflife | ||
order: 3 | ||
--- | ||
|
||
### `const float centerDepthHalflife = 1.0;` | ||
|
||
#### Location: any glsl file | ||
|
||
Sets the half life in ticks for the transition time for the [`centerDepthSmooth`](/reference/uniforms/general/centerdepthsmooth) uniform. The default value is 1 tick. |
13 changes: 13 additions & 0 deletions
13
src/content/docs/reference/Directives/Constants/drynessHalflife.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: drynessHalflife | ||
description: drynessHalflife | ||
sidebar: | ||
label: drynessHalflife | ||
order: 3 | ||
--- | ||
|
||
### `const float drynessHalflife = 200.0;` | ||
|
||
#### Location: any glsl file | ||
|
||
Sets the half life in ticks for the transition from dry to wet weather for the [`wetness`](/reference/uniforms/general/wetness) uniform. The default value is 200 ticks. |
13 changes: 13 additions & 0 deletions
13
src/content/docs/reference/Directives/Constants/eyeBrightnessHalflife.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: eyeBrightnessHalflife | ||
description: eyeBrightnessHalflife | ||
sidebar: | ||
label: eyeBrightnessHalflife | ||
order: 3 | ||
--- | ||
|
||
### `const float eyeBrightnessHalflife = 10.0;` | ||
|
||
#### Location: any glsl file | ||
|
||
Sets the half life in ticks for the transition time for the [`eyeBrightnessSmooth`](/reference/uniforms/general/eyebrightnesssmooth) uniform. The default value is 10 ticks. |
13 changes: 13 additions & 0 deletions
13
src/content/docs/reference/Directives/Constants/noiseTextureResolution.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: noiseTextureResolution | ||
description: noiseTextureResolution | ||
sidebar: | ||
label: noiseTextureResolution | ||
order: 3 | ||
--- | ||
|
||
### `const int noiseTextureResolution = 256;` | ||
|
||
#### Location: any glsl file | ||
|
||
Sets the resolution for [`noisetex`](/reference/buffers/noisetex). This texture is always square, so the value applies to both x and y axes. The default value is 256. |
15 changes: 15 additions & 0 deletions
15
src/content/docs/reference/Directives/Constants/shadowDistance.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,15 @@ | ||
--- | ||
title: shadowDistance | ||
description: shadowDistance | ||
sidebar: | ||
label: shadowDistance | ||
order: 3 | ||
--- | ||
|
||
### `const float shadowDistance = 160.0;` | ||
|
||
#### Location: any glsl file | ||
|
||
Sets the radius of the [shadow pass](/reference/programs/shadow) in blocks. The default value is 160 blocks. | ||
|
||
By default this does not cull geometry outside that distance, only applying a scaling factor to the shadow projection matrix. However setting [`shadowDistanceRenderMul`](/reference/directives/constants/shadowdistancerendermul) to a positive value will apply culling. |
15 changes: 15 additions & 0 deletions
15
src/content/docs/reference/Directives/Constants/shadowDistanceRenderMul.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,15 @@ | ||
--- | ||
title: shadowDistanceRenderMul | ||
description: shadowDistanceRenderMul | ||
sidebar: | ||
label: shadowDistanceRenderMul | ||
order: 3 | ||
--- | ||
|
||
### `const float shadowDistanceRenderMul = -1.0;` | ||
|
||
#### Location: any glsl file | ||
|
||
Sets the culling distance multiplier for the [shadow pass](/reference/programs/shadow). | ||
|
||
By default this value is `-1`, which means geometry outside the [`shadowDistance`](/reference/directives/constants/shadowdistance) are not culled. Setting this to a positive value applies culling to geometry outside `shadowDistance * shadowDistanceRenderMul` blocks from the camera. For example, `1.0` culls outside [`shadowDistance`](/reference/directives/constants/shadowdistance), `0.5` culls outside half of [`shadowDistance`](/reference/directives/constants/shadowdistance), and `2.0` culls outside twice [`shadowDistance`](/reference/directives/constants/shadowdistance). `shadowDistanceRenderMul` has no effect on the scale of geometry in the [shadow pass](/reference/programs/shadow). |
13 changes: 13 additions & 0 deletions
13
src/content/docs/reference/Directives/Constants/shadowHardwareFiltering.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: shadowHardwareFiltering | ||
description: shadowHardwareFiltering | ||
sidebar: | ||
label: shadowHardwareFiltering | ||
order: 3 | ||
--- | ||
|
||
### `const bool shadowHardwareFiltering = true;` | ||
|
||
#### Location: any glsl file | ||
|
||
Enables hardware shadow sampling (depth comparison mode) for [`shadowtex`](/reference/buffers/shadowtex) buffers. See [Hardware Sampling](/reference/buffers/shadowtex) for more info. |
15 changes: 15 additions & 0 deletions
15
src/content/docs/reference/Directives/Constants/shadowIntervalSize.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,15 @@ | ||
--- | ||
title: shadowIntervalSize | ||
description: shadowIntervalSize | ||
sidebar: | ||
label: shadowIntervalSize | ||
order: 3 | ||
--- | ||
|
||
### `const float shadowIntervalSize = 1.0;` | ||
|
||
#### Location: any glsl file | ||
|
||
Sets the snapping interval for the [shadow pass](/reference/programs/shadow) in blocks. | ||
|
||
By default the [shadow pass](/reference/programs/shadow) "snaps" geometry to the block grid, which means at the player moves, the geometry in the shadow pass only shifts when the player crosses the boundary between blocks. This is done to reduce visual jittering/noise in the shadows when moving. This interval can be configured with `shadowIntervalSize` (e.g. `2.0` would snap to every other block, `0.5` snaps to every half block), or disabled outright by setting the value to `0.0`. |
15 changes: 15 additions & 0 deletions
15
src/content/docs/reference/Directives/Constants/shadowMapFov.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,15 @@ | ||
--- | ||
title: shadowMapFov | ||
description: shadowMapFov | ||
sidebar: | ||
label: shadowMapFov | ||
order: 3 | ||
--- | ||
|
||
### `const float shadowMapFov = 90.0;` | ||
|
||
#### Location: any glsl file | ||
|
||
Sets the FOV (field of view) for the shadow pass. | ||
|
||
By default the shadow map uses orthographic rendering, which produces directional shadows which don't appear to come from a single point but instead a direction. Setting the FOV value however will change the rendering to a projection similar to the primary scene camera. This can be used to produce projected scene-like rendering similar to the [gbuffers](/reference/programs/gbuffers) programs, but from the [shadow pass](/reference/programs/shadow). |
13 changes: 13 additions & 0 deletions
13
src/content/docs/reference/Directives/Constants/shadowMapResolution.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: shadowMapResolution | ||
description: shadowMapResolution | ||
sidebar: | ||
label: shadowMapResolution | ||
order: 3 | ||
--- | ||
|
||
### `const int shadowMapResolution = 1024;` | ||
|
||
#### Location: any glsl file | ||
|
||
Sets the resolution for [`shadowtex`](/reference/buffers/shadowtex) and [`shadowcolor`](/reference/buffers/shadowcolor) buffers used in the [shadow pass](/reference/programs/shadow). These buffers are always square, so the value applies to both x and y axes. The default value is 1024. |
13 changes: 13 additions & 0 deletions
13
src/content/docs/reference/Directives/Constants/sunPathRotation.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: sunPathRotation | ||
description: sunPathRotation | ||
sidebar: | ||
label: sunPathRotation | ||
order: 3 | ||
--- | ||
|
||
### `const float sunPathRotation = 0.0;` | ||
|
||
#### Location: any glsl file | ||
|
||
Sets the angle rotation in degrees of the sun/moon perpendicular to their direction of travel. The default value of `0.0` has the sun/moon travel in the highest arch directly over the top of the sky dome. A larger value (negative or positive) will rotate that path such that it does not cross directly over the top of the sky dome. |
13 changes: 13 additions & 0 deletions
13
src/content/docs/reference/Directives/Constants/wetnessHalflife.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: wetnessHalflife | ||
description: wetnessHalflife | ||
sidebar: | ||
label: wetnessHalflife | ||
order: 3 | ||
--- | ||
|
||
### `const float wetnessHalflife = 600.0;` | ||
|
||
#### Location: any glsl file | ||
|
||
Sets the half life in ticks for the transition from wet to dry weather for the [`wetness`](/reference/uniforms/general/wetness) uniform. The default value is 600 ticks. |
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
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