How to Simulate Glass Dispersion in Blender

Glass dispersion is the optical phenomenon where light separates into its individual spectral colors as it passes through a transparent medium. In 3D rendering, this effect adds a high level of physical realism, producing subtle rainbow fringing and chromatic aberration along the edges of glass and gemstones. This guide explains the physics behind the dispersion effect and provides a step-by-step workflow for building a dispersion-enabled glass shader using Blender's Cycles render engine and Shader Editor nodes.

What is Glass Dispersion?

Dispersion occurs because a material's Index of Refraction (IOR) is not constant for all wavelengths of light. When white light enters a refractive material—such as glass, water, or diamond—shorter wavelengths (violet and blue) bend more sharply than longer wavelengths (orange and red).

Standard 3D render engines typically calculate refraction using a single uniform IOR value across the entire visible spectrum. While this optimizes rendering performance, it ignores chromatic separation, causing glass objects to appear overly digital or sterile. Simulating dispersion requires calculating slightly different refraction angles for different color channels.

Simulating Dispersion Using Blender Nodes

Blender’s default Principled BSDF and Glass BSDF nodes do not include a native dispersion slider in Cycles. To replicate this effect, you can split the light path into the primary red, green, and blue (RGB) color channels, assign a unique IOR to each, and combine them using additive blending.

Step 1: Set Up the Base Nodes

  1. Open the Shader Editor with your glass object selected.
  2. Delete the default Principled BSDF node.
  3. Add three Glass BSDF nodes (Shift + A > Shader > Glass BSDF).
  4. Add two Add Shader nodes (Shift + A > Shader > Add Shader).

Step 2: Configure the Color Channels

Assign each Glass BSDF to represent a single pure spectral band:

  • Red Glass BSDF: Set the Color to pure Red (R: 1.0, G: 0.0, B: 0.0).
  • Green Glass BSDF: Set the Color to pure Green (R: 0.0, G: 1.0, B: 0.0).
  • Blue Glass BSDF: Set the Color to pure Blue (R: 0.0, G: 0.0, B: 1.0).

Set the Roughness on all three nodes to 0.0 (or match them uniformly for frosted glass).

Step 3: Offset the Index of Refraction (IOR)

Base optical glass typically has an average IOR of around 1.52. Because red light bends the least and blue bends the most, offset the values accordingly:

  • Red Glass IOR: 1.514
  • Green Glass IOR: 1.520 (Base IOR)
  • Blue Glass IOR: 1.528

For materials with high dispersion like diamonds, use a wider spread (e.g., Red: 2.407, Green: 2.417, Blue: 2.435).

Step 4: Combine the Shaders

  1. Plug the Red Glass BSDF into the first input of the first Add Shader.
  2. Plug the Green Glass BSDF into the second input of the first Add Shader.
  3. Plug the output of the first Add Shader into the top input of the second Add Shader.
  4. Plug the Blue Glass BSDF into the remaining input of the second Add Shader.
  5. Connect the output of the second Add Shader to the Surface input of the Material Output node.

Because pure Red (1,0,0) + pure Green (0,1,0) + pure Blue (0,0,1) equals pure White (1,1,1), the combined shader renders as clear glass across flat surfaces while displaying accurate spectral separation along curved and refracted edges.

Automating IOR with Math Nodes

To make the shader easier to control without manually typing three IOR values every time:

  1. Add a Value node to serve as your Base IOR (e.g., 1.52).
  2. Add a second Value node to serve as your Dispersion Spread (e.g., 0.01).
  3. Add a Math node set to Subtract: connect Base IOR to the first socket and Dispersion Spread to the second socket. Plug this result into the Red Glass BSDF IOR.
  4. Connect the Base IOR directly to the Green Glass BSDF IOR.
  5. Add a Math node set to Add: connect Base IOR to the first socket and Dispersion Spread to the second socket. Plug this result into the Blue Glass BSDF IOR.

Group these nodes into a single Node Group (Ctrl + G) to reuse the material with simple slider controls across different projects.