Skip to Content
DocumentationFeaturesRim Lighting

Rim Lighting

Rim Lighting traces a Fresnel-style glow around the silhouette of a mesh, separating characters from their backgrounds and adding the classic “key light from behind” feel. Genesis layers rotation, light-direction masking, and an HDR tint on top, so the rim reads as either a soft bloom or a hard cartoon edge.

Video

A character orbited by the camera against a dark background, a cyan HDR rim tracing the silhouette and shifting as the view angle changes, separating the figure from the backdrop.

features/rim-lighting/rim-orbit.mp4

A Fresnel rim separating a character from a dark background as the camera orbits.

When to use it

  • Characters that need silhouette separation in dark scenes.
  • Toon stack — pair with Cel Shading and Outline for the canonical anime look.
  • Sci-fi and hologram surfaces — push an HDR rim into bloom for a glowing edge.
  • Cinematic shots that want a hand-placed back-light without spawning a real light.

How it works

Genesis evaluates 1 - dot(N, V) (Fresnel), raises it to _RimPower, multiplies by _RimColor * _RimIntensity, then optionally masks the result by saturate(dot(N, L)) when Light Dependent is on. The rotation term rotates the normal in screen space before the Fresnel, which moves the rim around the silhouette.

Lit material with no edge glow.

A cyan fresnel glow, here masked to the side facing the key light.

Off
Rim · cyan, light-dependent

A character with and without rim lighting. Drag to compare.

Properties

Inspector labelShader propertyTypeDefaultDescription
Rim Color_RimColorColor (HDR)RGB(1,1,1)Rim tint. Use HDR for bloom-driven edges.
Power_RimPowerFloat (0.1–16)4.0Fresnel exponent. Higher gives a thinner rim.
Intensity_RimIntensityFloat (0–8)1.0Overall multiplier.
Rotation_RimRotationFloat (0–360)0Rotates the rim around the view axis, in degrees.
Light Dependent_RimLightDependentToggleOffOff = full silhouette, On = masked by NdotL.
Softness_RimSoftnessFloat (0–1)0.0Smoothstep width applied before the power curve.
Rim Mask_RimMaskTexture2DNoneOptional UV mask limiting rim to specific regions.

Usage

  1. Enable Rim Lighting and set a color complementary to your scene’s key light.
  2. Dial Power to 3–6 for a wide, soft rim, or 8–16 for a thin, sharp one.
  3. Turn on Light Dependent so the rim appears only where the main light hits — far more believable for characters.
  4. Use Rotation in cinematics to anchor the rim to a specific direction.
material.SetColor("_RimColor", new Color(0.4f, 0.9f, 1.0f) * 2.0f); // HDR material.SetFloat("_RimPower", 6f); material.SetFloat("_RimLightDependent", 1f);

Tips & gotchas

  • Use HDR colors (intensity above 1.0) only if your camera has a Bloom override; otherwise they clip.
  • High Power values look noisy on low-poly meshes — raise Softness or smooth the normals.
  • With Light Dependent and Cel Shading both on, the rim inherits the cel banding edge; this is expected.
  • Rotation is screen-space, so verify both eyes match in VR captures.
Last updated on