Cyanilux / URP_ShaderGraphCustomLighting

Some custom lighting functions/sub-graphs for Shader Graph, Universal Render Pipeline
MIT License
558 stars 63 forks source link

Spot lights projecting light through objects #11

Closed fabulastudios closed 2 years ago

fabulastudios commented 2 years ago

Hey

I have found a weird problem with the spotlights. They seem to ignore distance in some instances the light shines through objects. Im using Unity 2021.3 LTS

image

image

fabulastudios commented 2 years ago

I have found that if I change the spotlight bands parameter for AdditionalLightsToon (Custom function) to 1, it does not happen

fabulastudios commented 2 years ago

I would think the problem lies in "float ToonAttenuation()".

Cyanilux commented 2 years ago

Thanks for reporting this issue! should now be fixed in main branch~