# Sandbox.LightModulator

Filters direct light passing through a textured rectangle or infinite plane in the local Y/Z plane.
This changes lighting on receivers; add a separate renderer to display the glass itself.

- Kind: class
- Namespace: `Sandbox`
- Assembly: `Sandbox.Engine`
- Inherits: [Sandbox.Component](/api/Sandbox.Component)
- Modifiers: sealed

## Constructors

- [`LightModulator`](/api/Sandbox.LightModulator/.ctor)

## Properties

- [`BlendMode`](/api/Sandbox.LightModulator/BlendMode): Multiply applies the texture directly; Lighten only boosts light and Darken only reduces it. Applied per RGB channel after contrast, brightness and tint, before strength and alpha.
- [`Brightness`](/api/Sandbox.LightModulator/Brightness): Linear brightness multiplier after contrast. One preserves brightness; values above one boost light. Alpha is unaffected. This is an artistic light multiplier, not physical light focusing.
- [`CausticsLayerScale`](/api/Sandbox.LightModulator/CausticsLayerScale): Scale of the second caustic sample relative to the first.
- [`CausticsSpeed`](/api/Sandbox.LightModulator/CausticsSpeed): Animation speed multiplier. Zero freezes caustic motion; negative values reverse it.
- [`CausticsTimeOffset`](/api/Sandbox.LightModulator/CausticsTimeOffset): Offset in caustic animation time, in seconds at the default speed.
- [`CausticsWobble`](/api/Sandbox.LightModulator/CausticsWobble): Maximum UV displacement in texture repeats.
- [`ChromaticSplitSeparation`](/api/Sandbox.LightModulator/ChromaticSplitSeparation): UV offset in texture repeats for the red and blue samples on either side of green.
- [`ChromaticSplitSpeed`](/api/Sandbox.LightModulator/ChromaticSplitSpeed): Rotation speed of the red/blue separation direction in radians per second.
- [`ChromaticSplitTimeOffset`](/api/Sandbox.LightModulator/ChromaticSplitTimeOffset): Offset in chromatic split animation time, in seconds at the default speed.
- [`CloudShadowDepth`](/api/Sandbox.LightModulator/CloudShadowDepth): Blend from white transmission at zero to the full cloud texture at one, before colour adjustments.
- [`CloudShadowLayerScale`](/api/Sandbox.LightModulator/CloudShadowLayerScale): Scale of the second cloud sample relative to the first.
- [`CloudShadowSpeed`](/api/Sandbox.LightModulator/CloudShadowSpeed): Cloud drift speed multiplier. Zero freezes the clouds; negative values reverse them.
- [`CloudShadowTimeOffset`](/api/Sandbox.LightModulator/CloudShadowTimeOffset): Offset in cloud animation time, in seconds at the default speed.
- [`Contrast`](/api/Sandbox.LightModulator/Contrast): RGB contrast around linear 0.5, before brightness and tint. One preserves the texture. Alpha is unaffected; negative RGB results are clamped to zero.
- [`DistanceFeather`](/api/Sandbox.LightModulator/DistanceFeather): Fade in modulation over this many world units from the rectangle's plane. Uses perpendicular distance for both surfaces and fog, independent of light angle or object scale. Zero disables distance feathering; full strength is reached at this distance and beyond.
- [`DistanceMipBias`](/api/Sandbox.LightModulator/DistanceMipBias): Softens transmission as light travels from the glass to the receiving surface or fog sample. Adds this many mip levels at 128 world units, twice as many at 384 units. Zero disables distance softening.
- [`EdgeFeather`](/api/Sandbox.LightModulator/EdgeFeather): Fade inward from each rectangle edge, as a fraction of its width or height. Zero gives a hard boundary; 0.1 fades across the outer ten percent on each axis. Uses the physical rectangle, independent of texture tiling or scrolling.
- [`Effect`](/api/Sandbox.LightModulator/Effect): Animate the projected texture before contrast, brightness, tint and blending. None preserves the existing texture mapping.
- [`Infinite`](/api/Sandbox.LightModulator/Infinite): Extend the rectangle to an infinite plane, without aperture clipping or edge feathering. Sidedness and distance feathering still apply.
- [`KaleidoscopeBlend`](/api/Sandbox.LightModulator/KaleidoscopeBlend): Blend from the original UV mapping at zero to fully mirrored sectors at one.
- [`KaleidoscopeSegments`](/api/Sandbox.LightModulator/KaleidoscopeSegments): Number of mirrored sectors around the center of the texture.
- [`KaleidoscopeSpeed`](/api/Sandbox.LightModulator/KaleidoscopeSpeed): Rotation speed of the mirrored pattern in degrees per second.
- [`KaleidoscopeTimeOffset`](/api/Sandbox.LightModulator/KaleidoscopeTimeOffset): Offset in kaleidoscope animation time, in seconds at the default speed.
- [`MipLevel`](/api/Sandbox.LightModulator/MipLevel): Explicit texture mip used by divergent light queries; larger values soften the projection.
- [`Offset`](/api/Sandbox.LightModulator/Offset): Texture-coordinate offset in repeats, applied after tiling and rotation.
- [`PulseDepth`](/api/Sandbox.LightModulator/PulseDepth): Brightness variation, from constant brightness at zero to a full zero-to-one pulse at one.
- [`PulseSharpness`](/api/Sandbox.LightModulator/PulseSharpness): Shape of the brightness pulse. One gives a sine wave; higher values narrow the bright interval.
- [`PulseSpeed`](/api/Sandbox.LightModulator/PulseSpeed): Brightness cycles per second. Zero freezes the pulse; negative values reverse it.
- [`PulseTimeOffset`](/api/Sandbox.LightModulator/PulseTimeOffset): Offset in pulse animation time, in seconds at the default speed.
- [`RippleDisplacement`](/api/Sandbox.LightModulator/RippleDisplacement): Maximum radial UV displacement in texture repeats.
- [`RippleFrequency`](/api/Sandbox.LightModulator/RippleFrequency): Radial wave frequency multiplier. Higher values produce more closely spaced waves.
- [`RippleSpeed`](/api/Sandbox.LightModulator/RippleSpeed): Wave animation speed multiplier. Zero freezes the ripples; negative values reverse them.
- [`RippleTimeOffset`](/api/Sandbox.LightModulator/RippleTimeOffset): Offset in ripple animation time, in seconds at the default speed.
- [`RotationSpeed`](/api/Sandbox.LightModulator/RotationSpeed): Clockwise rotation speed in degrees per second. Negative values rotate counterclockwise.
- [`RotationTimeOffset`](/api/Sandbox.LightModulator/RotationTimeOffset): Offset in rotation animation time, in seconds at the default speed.
- [`ScrollSpeed`](/api/Sandbox.LightModulator/ScrollSpeed): Scroll effect movement in repeats per second along U and V. Zero leaves the projection still. Runs in the shader without rebuilding textures or light candidate lists each frame.
- [`Size`](/api/Sandbox.LightModulator/Size): Rectangle width along local Y and height along local Z, before object scaling. For an infinite plane, this is the UV reference size when World Sized UVs is disabled.
- [`Strength`](/api/Sandbox.LightModulator/Strength): Blend between original light at zero and full texture modulation at one. Multiplies texture alpha and edge feathering rather than dimming the light itself.
- [`Texture`](/api/Sandbox.LightModulator/Texture): RGB transmission through the rectangle. Alpha blends between unfiltered and filtered light. Sampling uses the texture's own colour space.
- [`TextureRotation`](/api/Sandbox.LightModulator/TextureRotation): Clockwise rotation of the projected texture in degrees, around its center.
- [`Tiling`](/api/Sandbox.LightModulator/Tiling): Texture repeats across the rectangle, or per 128 world units with World Sized UVs enabled. Negative values mirror the texture. Scaling and rotation are centered on the rectangle.
- [`Tint`](/api/Sandbox.LightModulator/Tint): Linear RGB multiplier, including values above one for artistic caustics.
- [`TwoSided`](/api/Sandbox.LightModulator/TwoSided): Applies the filter in both directions. Otherwise light travels along local positive X only.
- [`WorldSizedUVs`](/api/Sandbox.LightModulator/WorldSizedUVs): Keep texture density independent of rectangle size and object scale. Tiling specifies repeats per 128 world units along the plane's axes, centered on its origin.
