Jump to content

Mesh Layers

From HedgeDocs
Revision as of 17:11, 7 August 2025 by Justin113D (talk | contribs)

In hedgehog engine games, each sub-mesh has a layer assigned that can enable or disable certain shader features for rendering, as well as change when it gets rendered.

Opaque

The default mesh layer, which completely ignores any transparency of a material.

In hedgehog Engine 2 games, this layer will attempt to use deferred rendering.

Transparent

Will render meshes with transparency blending. Makes use of the “use additive blending” feature.

Punch-through

When rendering a mesh, each rendered pixel will check if the sampled transparency is below the materials “clip threshold”. If it is, the pixel is discarded.

In hedgehog Engine 2 games, this layer will attempt to use deferred rendering.

An example transparency mask (left), the mask used with transparency blending (middle) and the mask used with transparency clipping (right)
An example transparency mask (left), the mask used with transparency blending (middle) and te mask used with transparency clipping (right)

Hedgehog engine 2 behavior

HE2 games (only confirmed for Shadow Generations right now) have some differing behavior:

  • Most (if not all) shaders do not use the materials clip threshold, and instead use a scene variable, which is (unless somehow modified) always at 0.5
    • Transparency values above 0.5 also get dithered
  • Shaders using noise dithering (usually denoted by having _dither_ in their name) use a static clip threshold of 0
Cookies help us deliver our services. By using our services, you agree to our use of cookies.