قالب وردپرس قالب وردپرس قالب فروشگاهی وردپرس وردپرس آموزش وردپرس

Unity 2D Lights Bug: Normal Maps Not Working Correctly (URP Fix Guide)

Unity Trigger Bug: OnTriggerStay Inconsistent Behavior
Unity Trigger Bug: OnTriggerStay Inconsistent Behavior (Causes and Reliable Fixes)
February 11, 2026
Unity ScriptableObject Bug: Data Resetting During Play Mode
Unity ScriptableObject Bug: Data Resetting During Play Mode
February 11, 2026

Unity 2D Lights Bug: Normal Maps Not Working Correctly (URP Fix Guide)

Unity 2D Lights Bug

A common issue in Unity 2D projects using the Universal Render Pipeline (URP) is that normal maps do not appear to work correctly with 2D Lights. Developers often report that:

  • Sprites look flat even with normal maps assigned
  • Lights do not react to surface detail
  • Normal maps appear inverted or broken
  • Lighting works in Scene view but not in Game view

This problem is usually not a Unity engine bug, but a configuration mistake in URP, materials, textures, or light setup. In this guide, we will explain the real causes and how to fix them properly.

Understanding How 2D Lighting Works in URP

Unity’s 2D lighting system works only when:

  • You are using Universal Render Pipeline (URP)
  • The project uses a 2D Renderer
  • Sprites use a 2D Lit material
  • Normal maps are imported correctly

If any of these requirements are missing, normal maps will not affect lighting.

Problem 1: Using the Wrong Material

The most common reason normal maps do not work is using the wrong sprite material.

If your sprite uses:

  • Sprites/Default
  • Any Unlit shader

Normal maps will not respond to lights.

Correct solution:

  • Change material shader to Universal Render Pipeline / 2D / Sprite-Lit-Default

This shader supports 2D lighting and normal maps.

Problem 2: Project Not Using 2D Renderer

Even if URP is installed, your Renderer asset must be set to 2D Renderer.

Fix:

  • Open Project Settings → Graphics
  • Assign URP Pipeline Asset
  • Inside URP asset, ensure Renderer is set to 2D Renderer

If using Forward Renderer, 2D normal maps will not behave correctly.

Problem 3: Normal Map Imported Incorrectly

Normal maps must be imported properly, or Unity will treat them like regular textures.

Correct import settings:

  • Texture Type: Default
  • Check Create from Grayscale if needed
  • Or set Texture Type to Normal Map
  • Disable sRGB (Color Texture) for normal maps

After changing import settings, click Apply.

Problem 4: Normal Map Not Assigned to Secondary Texture

In Unity 2D, normal maps must be assigned as a Secondary Texture in the Sprite Editor.

Fix:

  • Select the sprite texture
  • Open Sprite Editor
  • Click Secondary Textures
  • Add a texture named NormalMap

The name must match exactly: NormalMap.

Problem 5: Light Type Does Not Support Normals

Only certain 2D light types support normal maps:

  • Point Light 2D
  • Freeform Light 2D
  • Spot Light 2D

Global Light 2D does not create visible normal map shading differences.

Problem 6: Normal Map Strength Too Weak

Sometimes the normal map is working, but the effect is subtle.

Increase:

  • Light Intensity
  • Normal Map Distance
  • Normal Map Quality in URP settings

Also test with exaggerated normal maps to confirm it is functioning.

Problem 7: Z-Axis or Sorting Layer Issues

2D lights operate within specific sorting layers and blending styles.

Check:

  • Sprite sorting layer matches light’s target sorting layers
  • Z positions are consistent
  • Light’s Blend Style supports normal maps

Problem 8: Camera Not Using URP Renderer

If lighting works in Scene view but not Game view, the camera may not be using the correct renderer.

Fix:

  • Select Camera
  • Ensure Renderer is set to your 2D Renderer

Problem 9: Shader Graph Custom Shader Missing Normal Support

If using Shader Graph, make sure:

  • The graph is set to Sprite Lit target
  • A Normal input node is connected
  • Surface type supports lighting

If not, normal maps will not affect lighting.

Quick Debug Checklist

  • Are you using URP?
  • Is Renderer set to 2D Renderer?
  • Is the material Sprite-Lit-Default?
  • Is the normal map imported correctly?
  • Is the normal map assigned as Secondary Texture?
  • Is the light type correct?
  • Are sorting layers matching?

Professional Best Practice

For production-quality 2D lighting:

  • Use Sprite-Lit-Default or custom 2D Lit Shader Graph
  • Keep consistent normal map direction (OpenGL style)
  • Test lighting with extreme light angles
  • Use properly authored normal maps, not auto-generated grayscale maps

Conclusion

Unity 2D normal maps not working correctly is usually caused by incorrect URP setup, wrong material selection, improper import settings, or misconfigured light components. Once the project is correctly configured with a 2D Renderer, Sprite-Lit material, properly imported normal maps, and supported light types, the system works reliably.

Understanding how Unity’s 2D lighting pipeline operates is key to avoiding this issue and achieving professional-quality 2D lighting results.

Leave a Reply

Your email address will not be published. Required fields are marked *

Skip to toolbar