Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
518bb0c
Added pages about volumetrics and developer ui
Mar 19, 2026
7f7d84b
Updated the Dev UI pages
Mar 19, 2026
089e102
initial commit for volumetric post
kiddu25 Mar 19, 2026
1fa99a8
add image and gif + wip workaround csm interact with obb_volumefog
kiddu25 Mar 19, 2026
b89605a
fix : remove duplicate image that i add it
kiddu25 Mar 19, 2026
c3cd671
Updated Volumetrics pages
Mar 20, 2026
403e0e1
Updated devui/graphics.md
Laveig Mar 20, 2026
c237b14
Merge branch 'StrataSource:main' into main
Laveig Mar 20, 2026
0db1e2e
wip progress on obb_volumefog + new image
kiddu25 Mar 20, 2026
88344ab
push before i forgot + new image
kiddu25 Mar 20, 2026
47c4a89
Updated DevUI pages
Mar 20, 2026
ffea334
Merge branch 'main' of https://github.com/Laveig/Wiki
Mar 20, 2026
33e0184
Updated the volumetrics pages
Mar 20, 2026
65fe68b
wip quick_setup + add image
kiddu25 Mar 20, 2026
583b094
explain what is volumetric
kiddu25 Mar 20, 2026
0e3b4fa
precise that env_projectexture can do light cookies
kiddu25 Mar 20, 2026
aeb9a11
Grammar mistakes
Mar 20, 2026
412f879
Merge branch 'main' of https://github.com/Laveig/Wiki
Mar 20, 2026
d16711f
Updated DevUI pages
Mar 20, 2026
e3118ed
Fixed grammar mistakes
Mar 20, 2026
2826f84
Updated the DevUI pages.
Mar 22, 2026
2697683
feat: Add P2CE changelog 2026 03 18
ozxybox Mar 23, 2026
229bb9c
Small update on devui pages
Mar 23, 2026
e3e1a73
Minor changes
Laveig Mar 23, 2026
5f059aa
Merge branch 'StrataSource:main' into main
Laveig Mar 23, 2026
ed61044
Update profiler.md
Laveig Mar 23, 2026
e2f48cd
Updated devui pages
Laveig Mar 24, 2026
67ff6e0
Update profiler.md
Laveig Mar 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions docs/lighting/clustered/clustered_light_inspector.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@ features:

# Clustered Light Inspector

Clustered Light Inspector is a menu where you can control `light_rt` entities in real time in-game. There are various options that give almost a full control over the entity. You can control all the default light options, such as `Constant`, `Linear`, `Quadratic`, `0% Intensity Falloff`, `50% Intensity Falloff`, `Minimum Brightness Threshold`, `Override Radius` and `Light Scale`, as well as `Color` using the color palette, `Shadow Scale`, `Near Z`, light's `Pattern` and entity's position in the map.
Clustered Light Inspector is a menu where you can control `light_rt` entities in real time in-game. There are various options that give almost a full control over the entity. You can control all the default light options, such as `Constant`, `Linear`, `Quadratic`, `0% Intensity Falloff`, `50% Intensity Falloff`, `Minimum Brightness Threshold`, `Override Radius`, `Light Scale`, `Volumetric Light Scale` and `Volumetric Density`, as well as `Color` using the color palette, `Shadow Scale`, `Near Z`, light's `Pattern` and entity's position in the map.

There are additional debugging and finding options. "Show Light Bounds" is relevant for `light_rt` and shows bounds of the light as a sphere. "Show Light Cone" is relevant for `light_rt_spot` and shows bounds of the light spot. "Show Only in Radius" will only display clustered lights in a specified radius. Additionally, you can toggle the specular reflection, the direct dynamic lighting, volumetrics coming from the light and this light's shadows.

## Enabling The Inspector

In P2:CE, you can enable the Clustered Lighting Inspector UI using the `devui_show light_editor` console command.
In P2:CE, you can enable the Clustered Lighting Inspector UI using the `devui_show light_editor` console command, or by using the `devui_menu_toggle` command and selecting `Clustered Light Inspector` menu in the `Graphics` tab.

![Developer UI](images/devui3.png)

There are additional debugging and finding options. "Show Light Bounds" is relevant for `light_rt` and shows bounds of the light as a sphere. "Show Light Cone" is relevant for `light_rt_spot` and shows bounds of the light spot. "Show Only in Radius" will only display clustered lights in a specified radius.

> [!TIP]
> Position bars are scrollable!

* Top: Clustered Light Inspector
* Middle: Clustered Light Inspector with the selected light's properties tweaked
* Bottom: Clustered Light Inspector with the selected light's position edited using XYZ bars

> [!TIP]
> Position and angle bars are scrollable!

![Clustered Light Inspector](images/clustered_ui1.png)

![Clustered Light Inspector](images/clustered_ui2.png)
Expand Down
Binary file modified docs/lighting/clustered/images/clustered_ui1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/lighting/clustered/images/clustered_ui2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/lighting/clustered/images/clustered_ui3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/lighting/clustered/images/devui3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/lighting/clustered/images/volumetrics.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 0 additions & 2 deletions docs/lighting/clustered/quick_start.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ features:
3. Set "Direct Light Mode" to "Static Only"
4. Set "Indirect Light Mode" to "Static Only"
5. Set "50 percent falloff distance" and "0 percent falloff distance" KeyValues to adjust the look and feel
6. For best results, use PBR textures with appropriate MRAOs and normal maps

![Keyvalues](images/properties_static.png)

Expand All @@ -51,7 +50,6 @@ features:
3. Set "Direct Light Mode" to "None"
4. Set "Indirect Light Mode" to "Static Only"
5. Set "50 percent falloff distance" and "0 percent falloff distance" KeyValues to adjust the look and feel
6. For best results, use PBR textures with appropriate MRAOs and normal maps

![Keyvalues](images/properties_indirect.png)

Expand Down
7 changes: 7 additions & 0 deletions docs/lighting/clustered/what_is.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,18 @@ You can control the size of the shadow map by changing the "Initial Shadow Size"
> [!WARNING]
> When increasing the outer angle of `light_rt_spot`, note that the edges of the spot will have sharper shadows than the center. This is important since setting up a `light_rt_spot` with a high shadow size and a high outer angle will produce low-quality shadows in the center while still taking up a huge piece of shadow atlas. Consider using `env_projectedtexture` or `env_cascade_light` (when imitating sunlight) in scenarios like these.

## Volumetrics
Clustered lighting supports volumetric lighting. More about volumetric lighting and how it works on [the page about volumetric lighting.](/lighting/volumetrics/intro)

## Light Cookies
Light cookies, also known as cookie textures, are supported by clustered lights (`light_rt` and `light_rt_spot`). They can be used to apply a pattern to a light, controlling its shape and brightness. If you're not familiar with the concept of light cookies, imagine them like putting a piece of paper over a flashlight. If you were to cut out a shape from the paper, it would allow light to pass through, projecting a specific shape. Light cookies also have a similar effect to projected textures (`env_projectedtexture`).

In Hammer, light cookies can be added to a light using the "Cookie Texture Name" and "Cookie Texture Frame" properties. When looking at lights through the Light Inspector, the texture can be set under "Pattern".

Volumetric lighting also works with light cookies.

![Volumetrics & light cookies](images/volumetrics.png)

## Console commands

There are some clustered-related console commands that give a more precise control over clustered shadows.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/lighting/volumetrics/images/graphics_vol.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/lighting/volumetrics/images/light_rt_kv.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/lighting/volumetrics/images/ptex_vol.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/lighting/volumetrics/images/volumetrics.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
101 changes: 101 additions & 0 deletions docs/lighting/volumetrics/intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
---
title: "Introducing Volumetrics"
weight: 10
features:
- USE_CLUSTERED
---

> [!NOTE]
> This page is work in progress. Please be patient!
> TODO fill me.

# Volumetric Lighting

Volumetric Lighting is a rendering effect that simulates light rays scattering in the air.
It allows light to have an occlusion effect, meaning objects can block the light, creating realistic shadows inside the volume.

![Volumetrics](images/basic_volumetric.gif)

> [!NOTE]
> Player model interacts with volumetric lighting, even in the first person view.

![Volumetrical Player Shadow](images/vol_playershadow.png)

## The Setup

There are 3 KeyValues in `light_rt` and `light_rt_spot` entities: `Volumetric Light Mode` **`Volumetric Density`** and **`Volumetric Light Scale`**:

* `Volumetric Light Mode` toggles the volumetric lighting for this entity, can be set to either *None* or *Dynamic Only*.
* `Volumetric density` is a floating number between 0 and 1, where 1 is fully opaque and 0 is completely invisible.
* `Volumetric Light Scale` is a floating number that scales the color of the volumetric lighting casted by this entity, it is not recommended to set higher than 1.

`env_projectexture`, except for `Enable Volumetrics`, have only volumetric-related KeyValue - `Volumetric Intensity`, which is identical to `Volumetric Density`. But unlike all the other entities that produce volumetrics, projected texture volumetrics work with WebM videos.

## Light Cookies and WebM support

Volumetrics support light cookies from `light_rt`, `light_rt_spot` and `env_projectedtexture`, as well as WebM videos from `env_projectedtexture` entity. The volumetrics casted by the lights that use light cookies and WebM videos will update and show up correctly.

![WebM Volumetrics](images/ptex_vol.gif)

## Volumetrical Fog

In addition to individual volumetrics for the Clustered lights, there is a point entity called `obb_fogvolume`. It allows you to place a volumetric fog in your map. It can have a different shape, color and density, but most importantly, **it projects volumetrical rays of the lights that intercept it**. Simply put, this ...

#### KeyValues:
* The width
* The height
* The depth of the fog
* the color of the "emissive"
* the color of the "scaterring"
* a `Spheroid` KeyValue
* the KeyValue `Texture Name`
* the X and Y axes of the custom texture slices.

> TODO: replace the keyvalues above with the actual keyvalues with propper grammar.

`obb_volumefog` is cubic by default. There is a `Spheroid` KeyValue to make the fog spherical.

![OBB_VolumeFog Cube](images/obb_volumefog_cube.jpg)

![OBB_VolumeFog Sphere](images/obb_volumefog_sphere.jpg)

The shape of `obb_fogvolume`'s volumetric fog can be changed with the "Texture Name" KeyValue. The texture should be ... This kind of texture can be made in ...

The X and Y axes of the 3D-to-2D texture slices can be changed via (KEYVALUES).

![OBB_VolumeFog with a custom texture](images/obb_volume_changetexture.jpg)

All the `obb_fogvolume`'s KeyValues can be changed in realtime in-game using the Clustered Volumetrics Inspector.

![Clustered Volumetric Inspector](images/fog_inspector.png)

## Global Volumetrical Fog

To set up the volumetric fog for the whole map, you can use the 'Clustered Volumetrics Inspector' in the Developer UI menu. You can enable the Clustered Volumetrics Inspector UI using the `devui_show vol_editor` console command, or by using the `devui_menu_toggle` command and selecting `Clustered Volumetrics Inspector` menu in the `Graphics` tab.

Clustered Volumetrics Inspector allows setting the volumetrical value for all clustered lights globally, allowing to preview the new volumetric lighting on the maps that were compiled before the update. It does that by applying a pseudo-`obb_fogvolume` that covers the whole map, values of which are controlled by this menu.

![CVI](images/graphics_vol.png)

**Clustered Volumetrics Inspector has the following list of values:**

* `Show Volume Bounds` - if an `obb_fogvolume` entity is present, it will show its bounds as a white box.
* `Show Only in Radius` will only show `obb_fogvolume` entities in a specified radius. This only affects the `obb_fogvolume` list below.
* `Default Fog Emissive Color` sets the emissive fog color for the whole map. Appears on top of the regular fog created by `env_fog_controller`, works similarly.
* `Default Fog Density` sets the density of the fog for the whole map, similarly to the `env_fog_controller`'s fog density.
* `Default Fog Scattering Color` sets the color for the volumetric rays that are casted by CSM and Clustered lighting. Useful only in maps that were compiled before the update.
* `Default Fog Phase` changes the starting / ending point of the volumetric rays. Only values from -1 to 1 are accepted. Default is 0 - no changes. Value of 0.5 cuts the volumetric rays in half, value of -0.5 makes only the ending half of the rays appear.

![CVI Menu](images/graphics_vol-menu.png)

If you specify an `obb_fogvolume` entity in the fogvolume list, the following properties will be able to be changed:
* `Position` of the fog entity, with the value being the center of the fog;
* `Angles` of the fog entity;
* `Half Size` of the fog, which is split into width, length and height;
* `Spheroid Volume`, which determines whether the fog should be drawn as a cube or as a sphere;
* `Fog Density`;
* `Emissive Color`, which is the color of the fog itself;
* `Scattering color`, which is the color of the volumetric rays that go through the fog's volume;
* `Fog Phase`, which is similar to the `Default Fog Phase` except it is applied individually to this `obb_fogvolume`.

![Clustered Volumetric Inspector](images/fog_inspector.png)
3 changes: 3 additions & 0 deletions docs/lighting/volumetrics/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"title": "Volumetrics"
}
66 changes: 66 additions & 0 deletions docs/lighting/volumetrics/quick_setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
title: Quick Setup
weight: 20
features:
- USE_CLUSTERED
---

# Quick Setup

You can set up volumetrics in 3 different ways:
1. By using the corresponding KeyValues in `light_rt`, `light_rt_spot` and `env_projectedtexture`;
2. By using `obb_fogvolume` that defines volumetric rays specifically for the fog volume it produces;
3. Through the [Clustered Volumetric Inspector](/misc/devui/categories/graphics#clustered-volumetrics-inspector) in the Developer UI menu.

### Using KeyValues:

**For Light_rt and light_rt_spot**
1. Add a light_rt or light_rt_spot entity
2. Set the "Volumetric Light Scale" KeyValue to some value between 0.1 and 1.0
3. Set the "Volumetric Density" KeyValue to some value between 0.1 and 1.0
4. Make sure the "Shadowed" flag is **checked**
5. Compile the map. The volumetrics should appear.

> [!NOTE]
> It is *not* necessary to have the "Shadowed" flag enabled for the volumetrics to appear.

![light_rt KV](images/light_rt_kv.png)

**For env_projectexture**

1. Add an env_projectexture entity
2. Set the "Enable Volumetrics" KeyValue to Yes
3. Set the "Volumetric Intensity" KeyValue to some value between 0.1 and 1.0
4. Compile the map. The volumetrics should appear.

> PHOTO FOR env_projectedtexture

### Using `obb_fogvolume`:

1. Add an obb_fogvolume entity
2. Set the KeyValue to some value
3. Set the KeyValue to some value
3. Set the KeyValue to some value
3. Set the KeyValue to some value
3. Set the KeyValue to some value
3. Set the KeyValue to some value
3. Set the KeyValue to some value
3. Set the KeyValue to some value
3. Set the KeyValue to some value
4. Compile the map. The volumetric cloud should appear

> PHOTO FOR obb_fogvolume

### Using Clustered Volumetric Inspector:

You can configure and change the volumetric Lighting settings on the maps.
You can disable and enable it.
You can also change the Volumetric density and the light scale.

![Clustered Volumetric Inspector](images/clustered_light_inspector_volumetric.jpg)

# How to make it work for Cascade Shadow Mapping

Currently, there are no KeyValues to enable volumetrics in `env_cascade_light` entity. However, there are two ways to make them appear - by using `obb_fogvolume` entity, or through the [Clustered Volumetric Inspector](/misc/devui/graphics).

![Volumetric effect of the Cascade Shadow Mapping](images/obb_volumefog_csm_interact_workaround.jpg)
24 changes: 24 additions & 0 deletions docs/lighting/volumetrics/troubleshooting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
title: Troubleshooting
weight: 30
features:
- USE_CLUSTERED
---

# Troubleshooting

### The volumetrics don't show up!

Skill issue.

### The volumetrics are too intense!

Same issue.

### My Volumetrics are broken and corrupt!

We fucked all the AMD GPUs in the ASS! Go buy an nvidia, we don't care.

### How do I get to use it? I don't have P2CE

Dude... ugh. Just shut up. Open beta in 2 months.
44 changes: 44 additions & 0 deletions docs/misc/devui/categories/debug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
title: Debug
weight: 80
---

# \*deep breath\*

The last, eighth tab, is the default ImGUI debugging window. TBF I shouldn't be covering it, it's a default debugging menu after all. But hey, someone's gotta do it, otherwise there will be a whole undocumented tab and some random kid is gonna complain about that.

![Debug](images/debug.png)

It consists of... quite a lot of things. I'd say, *too many* things to cover for an unpaid volunteer like me.

![Debug menu](images/debug_menu.png)

> There is also a metrics menu that wasn't there before. I made a screenshot but it's on you to document it.

So there are 8 dropdown menus: **Help**, **Configuration**, **Window options**, and other dropdowns that are related to ImGUI debugging.

****

# Help

This dropdown menu is a README about the debugging window. It explains what it contains, where each stuff is and how to work with it.

![Debug Help menu](images/debug_menu_help.png)

****

# Configuration

Flags that can be toggled, manually or when setting up ImGUI.

![Debug Config menu](images/debug_menu_cfg.png)

****

# Window options

Window options. They do not extend to other windows and are not saved when closing the menu. Most of them are purely visual.

![Debug Window options menu](images/debug_menu_options.png)

****
Loading