Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Cel/Toon shading on sprites with normal maps

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

  1. oakus

    oakus

    Joined:
    Dec 27, 2012
    Posts:
    15
    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.