The exact difference between OpenGL (+Y) and DirectX (−Y)
A tangent-space normal map encodes a 3D surface direction vector inside three RGB color channels: Red stores the X axis (left to right), Green stores the Y axis (vertical), and Blue stores the Z axis (pointing outward from the surface). Both OpenGL and DirectX agree on Red (+X points right) and Blue (+Z points out toward the viewer).
They disagree on exactly one channel: Green (Y). OpenGL normal maps use +Y (positive green points up, toward the top of the texture). DirectX normal maps use −Y (positive green points down, toward the bottom of the texture). Converting a valid OpenGL normal map into a DirectX normal map—or vice versa—requires only inverting the green channel (255 minus G in 8-bit images).
Because the red and blue channels stay unchanged, flipping the green channel does not alter slope magnitude or horizontal lighting. It strictly corrects whether top-facing bevels catch overhead light or fall into shadow.
Engine and DCC compatibility table
Use this table when exporting from Normal Map Studio or checking assets downloaded from a third-party texture library. If a project mixes tools—such as authoring in Blender and rendering in Unreal Engine—pick one canonical export convention per asset folder and document it in the filename.
| Tool / Engine | Default Convention | Green Direction | How to Fix a Mismatch |
|---|---|---|---|
| Blender (Cycles / EEVEE) | OpenGL (+Y) | +Y up | Add Separate Color → Invert Green → Combine Color, or re-export OpenGL |
| Unity (URP / HDRP / Built-in) | OpenGL (+Y) | +Y up | Re-export as OpenGL +Y; Unity does not provide a one-click green flip in default import |
| Unreal Engine 5 | DirectX (−Y) | −Y down | Enable Flip Green Channel in Texture Editor, or re-export DirectX −Y |
| Godot 4 (Forward+ / Mobile / GL) | OpenGL (+Y) | +Y up | Re-export as OpenGL +Y or flip green in shader/image editor |
| Three.js / Babylon.js / glTF 2.0 | OpenGL (+Y) | +Y up | Use OpenGL +Y; glTF 2.0 specification requires OpenGL tangent-space normals |
| Substance 3D Painter / Designer | Configurable (DX default) | Project setting | Check Project Configuration Normal Map Format before exporting |
| Autodesk Maya | OpenGL (+Y) | +Y up | Export OpenGL +Y for Arnold and Viewport 2.0 |
| Autodesk 3ds Max | DirectX (−Y) | −Y down | Export DirectX −Y or toggle Flip Green (Y) in Normal Bump map |
How to tell OpenGL from DirectX by eye in five seconds
You do not need to guess which format an unlabeled texture uses. Open the normal map in any image viewer and inspect a clearly raised feature, such as a brick, rivet, or pebble:
In an OpenGL (+Y) normal map, the top edge of a raised bump looks bright green/cyan, while the bottom edge looks magenta/purple. Imagine shining a green light straight down from the top of the image onto the raised shape.
In a DirectX (−Y) normal map, the bottom edge of a raised bump looks bright green/cyan, while the top edge looks magenta/purple. Imagine shining a green light upward from the bottom of the image.
When in doubt, load the map or source into the Normal Map Generator, switch to the 3D sphere or plane preview, and drag the movable light from the top to the bottom. A bump should brighten on the side facing the light; if the shadow moves to the lit side, flip between OpenGL +Y and DirectX −Y.
Common pipeline mistakes that look like a green-channel flip
Not every inverted-looking surface is an OpenGL versus DirectX mismatch. Two other pipeline errors produce deceptively similar symptoms:
First, importing a normal map as sRGB instead of linear / Non-Color data shifts the neutral midpoint from 0.5 toward ~0.214. That skews every surface vector sideways and makes specular highlights look bent or overly dark across the entire mesh, even when the green channel is right.
Second, generating a normal map from a photograph with strong directional shadows bakes lighting into the height field. If sunlight came from the bottom-left of a stone wall photo, the derivative filter interprets the dark shadow side as a deep trench. Inverting height or cleaning lighting fixes that—not flipping OpenGL to DirectX.
- Open the Normal Map Generator — Toggle OpenGL +Y and DirectX −Y live with an interactive 3D light preview.
- Blender OpenGL +Y Setup Guide — Configure Non-Color Space and Principled BSDF without dark seam bugs.
- Unity URP & HDRP Normal Map Guide — Set Texture Type: Normal map and verify DXT5nm / BC5 compression.
- Unreal Engine 5 DirectX −Y Guide — Configure TC_Normalmap and know when to use Flip Green Channel.
Questions about OpenGL vs DirectX normal maps
Quick answers to the green-channel questions that come up most often during engine handoffs.
Does Unity use OpenGL or DirectX normal maps?
Unity uses OpenGL (+Y) tangent-space normal maps across Built-in, URP, and HDRP pipelines, even when running on Windows with the Direct3D 11 or Direct3D 12 graphics API.
Does Unreal Engine 5 use OpenGL or DirectX normal maps?
Unreal Engine 5 expects DirectX (−Y) tangent-space normal maps by default. If you import an OpenGL normal map into UE5, enable Flip Green Channel inside the Texture Editor or re-export using the DirectX −Y preset.
What happens if you use a DirectX normal map in Blender?
Bumps and grooves appear vertically inverted under lighting: recessed cracks catch light as if they were raised ridges, and bevels shade from the opposite side of the lamp.
Is it better to flip the green channel in the engine or re-export?
Re-exporting with the right convention keeps every texture in your repository consistent and prevents teammates from forgetting a shader node or texture checkbox on individual assets.
Do OpenGL and DirectX normal maps differ in the red or blue channels?
No. Standard tangent-space OpenGL and DirectX normal maps share identical red (+X right) and blue (+Z outward) channels; only the green (Y) channel is inverted.
Which normal map format does glTF 2.0 require?
The official glTF 2.0 specification mandates OpenGL (+Y) tangent-space normal maps, which is why Three.js, Babylon.js, Blender glTF export, and web viewers expect OpenGL +Y.