Add a glow and a vignette
Updated
Your first effect: a script adds Bloom and Vignette to the main camera, only when they are missing, so bright objects glow and the edges darken.
Look at the glowing shapes and the darker corners. Drag to orbit the camera, scroll to zoom.
Add a glow and a vignette
#pragma lifecycle(startup)
function startup() { const eye = findEntity('Main Camera');
if (!eye.getComponent(BloomEffectComponent)) { eye.addComponent(new BloomEffectComponent({ intensity: 0.8, luminanceThreshold: 0.7 })); } if (!eye.getComponent(VignetteEffectComponent)) { eye.addComponent(new VignetteEffectComponent({ darkness: 0.4, offset: 0.5 })); }}How it works
Section titled “How it works”The script is explained step by step in Add a glow and a vignette.
Open it in XR Creator
Section titled “Open it in XR Creator”Download the project file below, then import it in XR Hub with Projects › New › Import, as described in Projects and templates. It opens in XR Creator with the same scene you see running above, each script already attached to its Behavior entity. From there you can edit the scripts, adjust components and their props, preview your changes, and deploy the result as a world of your own.
FirstEffect.xrproj