Skip to content

Corruption Shader

MochiesCode edited this page Sep 29, 2026 · 1 revision

The Corruption Shader (Mochie/Corruption) eats away at the world around it. Any surface within a radius of the object's center is replaced by a view into a rotating starfield or cubemap, as if reality had been torn open, with a noisy, animated boundary and a glowing rim. It's used by the Corruption Pool prefab in Assets/Mochie/Unity/Prefabs. It reads the depth of the scene, so it requires a Depth Light prefab (found in the same folder); the Corruption Pool prefab already includes one. The effect is hidden in mirrors.

Render Queue, at the top of the inspector, sets when the material draws relative to other objects. It defaults to Transparent (3000).

Background

What's seen through the corrupted area.

  • Color: The star texture and its HDR color. The color tints the background, and its alpha sets the opacity of the whole effect.
  • Cubemap: Replaces the star texture with a cubemap, seen in every direction like a skybox.
  • Samples (Star Texture): How many layers of stars should appear. Each layer rotates around a different axis, so they drift past each other. More samples is less performant.
  • Sample Blending (Star Texture): How the star layers combine: Add, Multiplyx2, Overlay, or Screen.
  • Scale (Star Texture): How many times the star texture repeats horizontally and vertically. Higher values give smaller, denser stars.
  • Brightness: Multiplies the brightness of the stars or cubemap.
  • Rotation Speed (Star Texture): How fast the star layers rotate.
  • Rotation Offset (Star Texture): How far each star layer is rotated from the previous one around the vertical axis, in degrees, which spreads the layers apart.
  • Rotation Speed (Cubemap): How fast the cubemap rotates around each axis (XYZ).

Corruption

The shape of the corrupted area.

  • Noise Type: The noise that shapes the boundary.
    • tanoise: Looks very similar to simplex but much more performant. This should pretty much always be used.
    • Simplex: 4D Simplex noise, much more expensive than tanoise, but looks a bit better.
  • Iterations: How many layers of noise should be generated. Fewer iterations will perform better, but look different. More layers add finer detail to the boundary.
  • Radius: The size of the corrupted area around the object's center.
  • Scale: The size of the noise. Higher values give a smaller, busier boundary.
  • Speed: How fast the noise animates.
  • Rim Color: The HDR color of the glow along the boundary. Its alpha sets how strong the glow is.
  • Rim Brightness: Multiplies the brightness of the glow.
  • Rim Width: How wide the boundary is. Wider boundaries fade in more softly and have a wider glow.

πŸ”’ = Patrons only


Avatar Shaders

Uber
Uber X πŸ”’
Uber X (Outline) πŸ”’
Taken πŸ”’
Avatar Props πŸ”’

Environment Shaders

Standard
Water
Water (Tessellated) πŸ”’
Underwater Visuals
Glass
Splat Mapping πŸ”’
LED Screen

Special Effects Shaders

Particles
Particles X πŸ”’
Screen FX
Screen FX X πŸ”’
Corruption πŸ”’

Links

Clone this wiki locally