Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on March 30, 2023, between 5 am & 1 pm EST, in the Performance Profiling Dev Blitz Day 2023 - Q&A forum and Discord where you can connect with our teams behind the Memory and CPU Profilers.
    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.