Skip to content

Expose the new volumetric fog settings on the camera-frame script - #9138

Merged
mvaligursky merged 1 commit into
mainfrom
mv-camera-frame-attrs
Jul 28, 2026
Merged

Expose the new volumetric fog settings on the camera-frame script#9138
mvaligursky merged 1 commit into
mainfrom
mv-camera-frame-attrs

Conversation

@mvaligursky

Copy link
Copy Markdown
Contributor

Follow-up to #9137, which added volumetric scattering from the clustered omni and spot lights but left the settings reachable only from code. This exposes them as attributes of the camera-frame ESM script, so Editor users can enable and tune the effect from the inspector.

localIntensity and localSteps are only shown once one of the two light types is enabled. The Editor's attribute conditions support full expressions (&&, ||, grouping), which is what makes the nested condition possible.

While comparing every CameraFrame settings group against the script, three unrelated gaps turned up in the same file and are fixed here as well.

Changes:

  • volumetricFog gains localOmniLights, localSpotLights, localIntensity, localSteps and extinction, completing the group - it now covers all 18 properties of the engine's CameraFrame.volumetricFog.
  • light is documented as optional, matching Add volumetric fog support for clustered omni and spot lights #9137 - leaving it unset lights the fog by the local lights and the ambient term alone.
  • Fixed ssao.blurEnabled never being applied. The attribute was declared, so the Editor showed the toggle, but it was missing from the settings that get copied to the CameraFrame and had no effect.
  • Added the missing ssao.randomize attribute, the alternative to blurring when TAA is enabled.
  • Exported VolumetricFog. It was the only settings group class left out of the export list, so unlike its ten siblings it got no page in the scripts API reference.

API Changes:

  • VolumetricFog is now exported from scripts/esm/camera-frame.mjs.

Performance:

  • None. The volumetric local lights remain off by default, so an existing project's settings are unchanged.

@github-actions

Copy link
Copy Markdown

Build size report

This PR does not change the size of the minified bundles.

Bundle Minified Gzip Brotli
playcanvas.min.js 2351.7 KB — 603.8 KB — 469.1 KB —
playcanvas.min.mjs 2349.1 KB — 602.7 KB — 468.6 KB —

@mvaligursky
mvaligursky merged commit f60726e into main Jul 28, 2026
10 checks passed
@mvaligursky
mvaligursky deleted the mv-camera-frame-attrs branch July 28, 2026 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant