(Emergency) Cel Shader Destoying light and Particles (Time Sensitive)

I Have a time sensitive problem. I am working on a Cel Shader For an anime style graphic. I’m mainly a programmer so forgive my ignorance if you see any. I made a post process that takes light from the light buffer, creates a posterization (Banded Light), from a 0-1 value where zero is completely unlit, and 1 is completely lit, and references a Look up Table gradient to allow the light to decide where the banding should be. This function is great and looks fine. However, there are some (2) limitation problems that I Cannot live with. (1) I have to be able to multiply the lookup table Data by the light “Color” to color the banded light strips. I tried to accomplish this by multiplying the Post Process 0 scene texture by the Look up table but it diminishes the banded lighting too much. (2) Particle effects… They are completely destroyed. It is shading the particle effect and custom depth has no bearing on whether or not it does. The material domain is set to before tonemapping. Nothing i do provides the intended result. If anyone can help with this issue, please do. I will share the code here if we figure it out.

Here is the Material Graph

Have you tried to use custom stencil to mask out the particles from the pp material?

I have not. I have never actually used stencils. Ill look into it now. Ill let you know.

Negative. The moment the particle system passes a object that IS rendering the cel shader it gets distorted.

I multiplied the Posterization result by the PostProcessInput0 and mix of the cell shader and scene color and that gives me Half of the result im looking for, however it adds back shadows that I do not want. I need to find a way to clamp the shadows to a LUT gradient. But the lighting code is just not exposed in the material editor.

Alright. With a stencil pass, and changing the material domain to Before Translucency, I fixed the Particle problem. Many thanks to you NasteX. Just gotta figure out now how to get the lighting “Color” data back into the Scene.

Nice that you figured it out! About the color normally multiplying the color with the “light buffer” should work, but I dont think you should do that on diffuse but rather on the scene color aka “Post Process 0” though that it diminishes the banding you have to show some screenshots on that. I also am not sure what kinf of look up table are you talking about. Is it like a gradient texture or?

Check out this video, it might give you some pointers -