← Back to Blog 3d-modeling

Glass and Transparent Materials in Unity, Unreal Engine 5, and Godot 4: A Complete PBR Guide

By BitSoul Team5/16/2026Updated 8/2/20265 min read87 views
Glass and Transparent Materials in Unity, Unreal Engine 5, and Godot 4: A Complete PBR Guide

Transparent materials are deceptively difficult. You get a glass shader working in Blender, export it to Unity, and suddenly you have sorting artifacts, black silhouettes, and a frame-rate drop nobody can explain. The root cause is almost always the same: real-time engines handle transparency fundamentally differently from offline renderers, and each engine has its own quirks you need to know before you touch a single node.

This guide walks through the theory once, then gives you concrete, tested setups for Unity Universal Render Pipeline, Unreal Engine 5, and Godot 4.

Why Transparency Is Hard in Real-Time Rendering

Rasterization-based engines draw geometry by writing color and depth values to a buffer. Opaque geometry writes to both. Transparent geometry only writes color — it cannot write depth, because the pixels behind it need to stay visible. This creates the overdraw sorting problem: if two transparent surfaces overlap, the engine must draw the one farther from the camera first, then the closer one on top. Get the order wrong and you get the classic see-through artifact where a near surface vanishes behind a far one.

GPU hardware solves opaque geometry with a depth pre-pass — reject any fragment that loses the depth test before even shading it. That optimization does not apply to transparent surfaces. Every transparent pixel costs a full fragment shader evaluation, regardless of whether it ends up visible. This is why particle-heavy scenes and glass-filled environments tank performance in ways that look disproportionate to their geometry count.

The three main approaches engines use are: alpha blending (blend source and destination colors by alpha), alpha testing (discard fragments below a threshold, writes depth), and order-independent transparency (sort-free multi-layer compositing). Each has different performance, quality, and compatibility trade-offs — knowing which one to reach for is the skill this guide is about.

Why Transparency Is Hard in Real-Time Rendering — illustrated

Setting Up Glass in Unity URP

Unity Universal Render Pipeline exposes transparency through the Surface Type dropdown in any URP-compatible shader. For glass, the critical path is:

  1. Create a new Lit material in your project.
  2. Set Surface Type → Transparent.
  3. Set Blending Mode → Alpha (not Premultiply — that is for UI).
  4. Enable Depth Write → Off (the default for transparent; enabling it breaks sorting).
  5. Set Render Face → Both for glass objects — single-sided glass looks wrong at any angle.

For the actual glass appearance:

Unity does not have built-in screen-space refraction in URP by default. For refraction, use Shader Graph with a Scene Color node that samples the opaque render pass. Enable Opaque Texture in your URP Asset settings or this node returns black.

| Property | Clear Glass | Frosted Glass | Tinted Glass |
|---|---|---|---|
| Smoothness | 0.95 | 0.45 | 0.90 |
| Base Alpha | 10–20 | 80–120 | 60–100 |
| Normal Strength | 0.05 | 0.80 | 0.10 |
| Refraction Strength | 0.02 | 0.06 | 0.02 |

Setting Up Glass in Unreal Engine 5

UE5 handles translucency through the Material Blend Mode and Lighting Mode properties. For glass:

  1. Create a new Material.
  2. Set Blend Mode → Translucent.
  3. Set Lighting Mode → Surface TranslucencyVolume for performance, or Surface ForwardShading for quality (costlier, better specular).
  4. Enable Two Sided in Material Properties.
  5. Wire an Opacity constant (0.05–0.2 for clear glass) into the Opacity input.

For refraction in UE5, connect a Refraction value (1.45–1.52 for most glass types) directly into the Refraction material input. UE5 handles the index of refraction math internally — change the refraction model in Material properties under Refraction Mode → Index of Refraction (not the cheaper pixel offset model).

Important: UE5 Nanite does not support translucent materials. Disable Nanite per-mesh for any transparent surface — a common cause of invisible glass in UE5 scenes.

Setting Up Glass in Unreal Engine 5 — illustrated

Setting Up Glass in Godot 4

Godot 4 uses StandardMaterial3D with transparency through the Transparency property group.

  1. Create a new StandardMaterial3D.
  2. Set Transparency → Alpha.
  3. Set Albedo Color with alpha 10–30 (out of 255).
  4. Enable Cull Mode → Disabled for two-sided rendering.
  5. Set Roughness: 0.02, Metallic: 0.0.

Godot 4 supports screen-space refraction natively via the Refraction property group in StandardMaterial3D. Enable it and set a refraction scale of 0.05–0.1. For custom refraction behavior, use a ShaderMaterial:

Performance Budgeting for Transparent Materials

Transparent surfaces have no depth culling, so overdraw is cumulative. A scene with five layers of glass in the same screen area is five full fragment shader evaluations per pixel:

Common Artifacts and How to Fix Them

Black silhouettes on glass: The material writes to the depth buffer. Disable Depth Write for transparent materials.

Z-fighting between parallel glass surfaces: Offset one mesh by 0.001 units, or use alpha test (cutout mode) if the material allows a hard edge.

Glass disappears when viewed through other glass: The sort only handles one transparent layer. Enable multi-layer transparency: UE5 Separate Translucency is on by default; Godot needs the screen-texture hint on the inner glass shader; Unity requires a custom OIT Renderer Feature.

Refraction looks wrong on moving objects: Screen-space refraction grabs the previous frame. For fast-moving glass (doors, vehicles), reduce refraction strength or disable it and rely on normal-map distortion only.

Find ready-to-use glass and transparent material asset packs for Unity, UE5, and Godot at BitSoul Marketplace. Assets ship with PBR-correct material presets already configured for each engine — no per-asset debugging required.

Getting transparency right pays dividends across every project. A correct glass shader in your library means every window, bottle, and crystal you place just works. Browse production-ready assets at BitSoul Marketplace and skip the trial-and-error.

Tags: pbr transparency glass unity unreal-engine-5 godot-4 shaders game-dev

Skip the modelling — download it instead

A free BitSoul account gets you 2 game-ready models every month plus 25 AI Engine credits to generate one of your own, no card required. Clean topology, PBR textures, and GLB downloads that drop straight into Unreal, Unity, Godot or Blender — plus OBJ and 3D-printable STL export.

Create a free account → Browse 846 models