Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Cel/Toon shading on sprites with normal maps

Discussion in '2D Experimental Preview' started by oakus, Jan 13, 2021.

  1. oakus


    Dec 27, 2012
    I wanted to do a cel/toon shading effect on sprites that I also provide normal map for, but looking into Sprite-Lit-Default shader and after some digging I found out that the light contribution calculates in "Hidden/Light2D-Point" shader (specifically LightingUtility.hlsl) which gets included in Renderer2DData class which would require me to provide my own rendering pipeline which copies the Unity one and changes these couple things, which would then make any update to this RP quite a pain so before I do that, I wanted to ask if maybe there is someone here who attempted to do the same thing and succeeded. Something like quantizing the normals instead of lighting contribution calculating based of them (not sure if this would work or even how to do that, these tangent spaces always gave me shivers) which we can do in custom "user" shaders.