skip to Main Content

Volumetric Light Parameters

The following options are visible when you add a Volumetric Lights component:

Profile: this field shows which profile is being used.

Rendering section

  • Blend Mode: blend or additive. Blend does the traditional alpha blending with the background while additive adds the light intensity to the existing pixels.
  • Raymarch Quality: influences the number of iterations executed in the raymarching loop. The lower value, the better performance.
  • Min Step Size: determines the minimum step size. Increase to improve performance (accuracy will be reduced as well).
  • Max Steps: determines the maximum number of steps or samples taken along each ray. This is a maximum value which can be lowered to improve performance by ensuring there’re no rays that take too many samples.
  • Dithering: reduces banding effect.
  • Jittering: reduces banding effect (especially useful when shadows are enabled).
  • Use Blue Noise: enables blue noise for jittering computation. It adds an additional texture fetch but reduces moiré pattern caused by regular jittering algorithm. Use only if you get a noticeable improvement.
  • Render Queue / Sorting Layer / Sorting Order: the volumetric effect renders in world space in the transparent queue. These settings allow you to customize the order of the rendering.
  • Flip Depth Texture: enable only if the light effect doesn’t render correctly or clips incorrectly with the existing geometry due to an inverted depth texture bug in URP. This can occur is MSAA if off, HDR is off and Render Scale is set to 1 in the URP asset. If you enable MSAA or HDR, the issue should not occur.
  • Always On: enabling this option will force the volumetric effect to be visible regardless of the light enable state. This option is useful to create fake volumetric lights, where only the volumetric effect is visible but the light component itself doesn’t add any overhead since you can disable it.

Appearance section

  • Use Noise: uses an internal noise texture instead of assuming an homogeneous medium.
  • Noise Texture: the asset will use a default 3D noise texture located in Resources/Textures folder. You can find more noise textures in Demo/NoiseTextures folder. You can also provide your own textures.
  • Density: density of the medium used during the raymarching loop. The greater value, the opaquer effect. A low-density value used in a very large light space can impact performance as the ray march loop needs to run many steps.
  • Diffusion Intensity: controls the intensity of the diffusion of the light when looking directly to the source through the medium.
  • Distance Falloff / Border: controls the falloff of the volume. Border has no effect on point lights.

Dust particles

The component will use a particle system with a custom particle shader that’s aware of the lighting volume geometry.

Shadow Occlusion

This option adds shadow support to the effect.

  • Shadow Intensity: amount of light cancelling due to shadows.
  • Shadow Resolution: resolution of the shadow map. Usually, you don’t need a very high value to create a good effect. Try to use the lower texture size as possible.
  • Shadow Culling Mask: specifies which objects cause shadows.
  • Shadow Bake Interval: specifies if shadow map is computed during start only or on every frame. Note that if the light is moved or rotated, the shadow map will be automatically recomputed.
  • Shadow Bake Mode (only for point lights): point light shadows are expensive – this option let you choose between computing shadows on a half sphere oriented to player (faster) or a cubemap (slower). If cubemap option is selected, you can choose to spread the rendering across several frames (1 face per frame) or render all 6 faces every frame.
  • Shadow Orientation (only for point lights): baked shadows captured in a half sphere (180º) for point lights requires orienting the camera. This option let you specify a fixed direction for the alignment of such half sphere or automatically orient it to the player camera.
  • Shadow Near Distance: specifies the near clip plane of the camera used to create the shadow map. This setting allows you to skip objects that are too near to the light.

 

Pro tip! When Shadow Bake Interval is set to OnStart, you can force shadows update anytime calling ScheduleShadowCapture() method of the VolumetricLight component attached to the light.

Other Settings

  • Use Custom Size: let you override light properties like range or size.
  • Use Custom Bounds: let you customize the boundary of the light effect effectively clipping the volumetric effect. This is useful to clamp the volumetric effect to certain corners for example. When this option is enabled, you will see the actual bounds in the Scene View and you can use the handlers of the cube to adjust it size.
Back To Top