API ReferenceGE ExtensionsClient Chromatic Lens PostFX
Chromatic aberration and lens distortion post-processing effect.
Chromatic aberration and lens distortion post-processing effect.
| Property | Value |
|---|
| Source | lua/ge/client/postFx/chromaticLens.lua |
| Returns | - (side-effect module) |
| Parameter | Variable | Default Value | Description |
|---|
| Distortion coefficient | distCoeffecient | 0.0 | Overall lens distortion strength |
| Cube distortion | cubeDistortionFactor | -0.25 | Barrel/pincushion distortion |
| Color distortion | colorDistortionFactor | "-0.0025 0.0 0.0025" | Per-channel (RGB) offset for chromatic aberration |
| Object | Type | Description |
|---|
PFX_DefaultChromaticLensStateBlock | GFXStateBlockData | Z-off, point sampling |
PFX_ChromaticLensShader | ShaderData | chromaticLens.hlsl shader |
ChromaticLensPostFX | PostEffect | Chromatic aberration, priority 100 |
| Global | Type | Description |
|---|
ChromaticLensPostFXCallbacks | table | setShaderConsts callback |
Sets three shader constants on ChromaticLensPostFX:
$distCoeff - overall distortion
$cubeDistort - barrel distortion factor
$colorDistort - RGB channel offsets
| Property | Value |
|---|
| Render Time | PFXAfterDiffuse |
| Priority | 100 |
| Enabled | false (disabled by default) |
| Reflect Pass | Disabled |
| Texture 0 | $backBuffer |
| Target | $backBuffer |
- Disabled by default.
- The default
distCoeffecient of 0.0 means no distortion unless modified.
- Color distortion shifts R and B channels in opposite directions (classic chromatic aberration).
- Logs to console on every
setShaderConsts call (may want to remove in production).