Transparency Shader Development for AR Helmet Displays

Developing Transparency Shaders for AR Helmet Displays in Games We build optimized shaders for AR helmets that account for the quirks of additive displays. Our experience spans projects for HoloLens 2 and Magic Leap 2, where every hologram must be crisp and blend naturally into the surroundings.

Our competencies

Other studio services

Frequently Asked Questions

Latest works

  • image_games_mortal_motors_495_0.webp
    Game development for Mortal Motors
    1504
  • image_games_a_turnbased_strategy_game_set_in_a_fantasy_setting_with_fire_and_sword_603_0.webp
    A turn-based strategy game set in a fantasy setting, With Fire and Sword
    1006
  • image_games_second_team_604_0.webp
    Game development for the company Second term
    635
  • image_games_phoenix_ii_606_0.webp
    3D animation - teaser for the game Phoenix 2.
    716
  • image_training-quizzes_kids_shopping_quiz_614_0.webp
    Educational quiz for kids "Shopping in a store"
    95

Developing Transparency Shaders for AR Helmet Displays in Games

We build optimized shaders for AR helmets that account for the quirks of additive displays. Our experience spans projects for HoloLens 2 and Magic Leap 2, where every hologram must be crisp and blend naturally into the surroundings. Without understanding display physics, shaders produce graphics that either disappear in bright rooms or look like blurry smudges against dark objects.

HoloLens 2 and Magic Leap 2 use additive displays. They don't paint a black background: holograms are overlaid directly onto what the user sees through the glass. This fundamentally changes shader logic. "Transparency" here isn't alpha-blending over a virtual background—it's literal transparency for the real world passing through the lenses.

Why Standard Shaders Don't Work for AR Helmets

On an additive display, a pixel with color (0, 0, 0) is completely transparent. Black literally emits no light. This means dark areas of a hologram don't mask the real world—you see right through them. To create the illusion of an opaque object, the object must be bright enough relative to the surrounding light.

First consequence: Standard Unity shaders with Rendering Mode = Opaque will look semi-transparent because their "dark" parts—shadows, AO, darkened faces—let through the real world. A HoloLens shader must minimize dark areas. Ambient lighting must be significantly higher than physically correct values—in practice, an Environment Lighting Intensity Multiplier from 1.5 to 2.5 depending on the scene.

Second consequence: The alpha channel behaves differently on additive displays. Alpha = 0 gives full transparency (neither the real world nor the hologram is visible—the pixel simply doesn't emit light). But intermediate alpha values are used for smooth fade-in/fade-out of the hologram, not for blending with a background. There is no "background" other than the real world.

How to Create a Transparent Glass Effect in ShaderGraph

The main task in games for AR helmets is to create a transparent glass effect with controlled fogging. For example, a protective shield that partially blocks the view, or a spaceship window.

In ShaderGraph (URP), this is built as follows: the base color of the object is mixed with a Fresnel Effect to emphasize edges (glass reflects more at glancing angles). The central area is near-zero Alpha, edges have higher Alpha via Smoothstep. The effect is noticeable against dark objects behind the glass, but nearly invisible against bright ones—because an additive display cannot darken the real world.

For a "fogged glass" effect, we use Procedural Noise as a mask—it breaks the uniformity of transparency and creates an organic look. However, we cannot use dark values in the noise mask for "fogging": dark areas simply become transparent. Fogging on an additive display is done with a light color on top, not dark.

A separate shader handles the object outline. Standard outline via Stencil or Normal Extrusion doesn't work well on additive displays because a dark outline is invisible. We need a glowing outline: Emission on contour pixels with intensity 2–4, and a warm or saturated color (blue, green work better than red due to the additive display's spectrum).

Working with MRTK and Mixed Reality Toolkit

For HoloLens development, we use MRTK (Mixed Reality Toolkit). According to official Microsoft documentation, there is a ready MRTKStandardShader optimized for additive displays—it accounts for platform limitations and works significantly better than the standard URP Lit shader. But its capabilities are limited, and custom effects require custom shaders built with the same principles.

Magic Leap 2 uses a different SDK—Magic Leap Unity SDK—but the display physics are the same: additive, only brighter. Shaders written for HoloLens mostly port directly, but ambient intensity thresholds need adjustment due to different display brightness. This saves up to 40% debugging time compared to developing from scratch.

Case Study: Cockpit Interface with Transparent Screens (from our practice)

In an AR flight deck simulator, we needed to implement instrument panels visible above the real pilot seat. The screens had to look like glass—with visibility of the real equipment behind them.

Problem: The emissive interface elements (scales, numbers) were bright and readable. But the screen "backplate"—a dark gray rectangle—was nearly invisible (additive displays don't show dark colors). The interface hung "in the air" without a frame that would give the feel of a physical screen.

Solution: We replaced the dark backplate with a faintly glowing one (Emission 0.15, warm gray). This added enough light to make the screen boundary visible, but not so bright as to occlude the real world. Additionally, we added Fresnel on the screen edges with intensity 0.3 to emphasize the shape.

Shader Type Complexity Estimated Timeline
Customization of MRTKStandardShader Medium 2–5 days
Transparent glass shader (ShaderGraph) Medium 3–7 days
Advanced effect (fogging, dynamic opacity) High 1–3 weeks
Porting shaders between platforms Depends on set 1–2 weeks

Shader Development Process for AR

  1. Platform and requirements analysis — identify target device (HoloLens 2, Magic Leap 2, etc.), performance and visual requirements.
  2. Shader design — choose approach: customize MRTKStandardShader or build a custom shader in ShaderGraph/HLSL.
  3. Implementation — write the shader, configure parameters (ambient, emission, alpha).
  4. On-device testing — verify under real lighting conditions, optimize draw calls and fill rate.
  5. Deployment and support — deliver source code, documentation, train the team.

What's Included

Stage Deliverable
Shader source code .shader or .shadergraph with comments
Material configuration Unity Material with tuned parameters
Documentation Description of principles and setup instructions
Support Consultations for one month after delivery
Common Mistakes in AR Shader Development
  • Using dark colors for fogging — they become transparent on additive displays.
  • Ignoring Fresnel Effect — glass looks flat without it.
  • Applying standard Outline without emission — outline invisible.
  • Testing only in one lighting condition — shader may work only in darkness.

Timeline and Cost

The cost of shader development varies by complexity. We calculate the exact amount after analyzing your project — contact us for an estimate. We guarantee correct operation on all supported devices and provide source code. Our experience: over 10 years in game dev and AR, more than 50 delivered projects. Get a consultation right now.