Robinseibold / Unity-URP-CelShadeLit

A custom made Unity URP cel shader that supports multiple lights and shadows.
MIT License
107 stars 14 forks source link

[Fixed] Undeclared identifier with custom node #1

Closed TitouanLEFROU closed 1 year ago

TitouanLEFROU commented 1 year ago

Hello, i'm running throught an error that i am unable to resolve with my beginner knowledge with HLSL. The console is giving me the following error code when using the custom node : "undeclared identifier 'LightingCelShaded_float' at line 296" . I understand that i doesn't recognize the name of my function by i can't figure out why. I look in the internet and try to play with the precision of the shader but it changed nothing.

Capture

When i show generated code here is what i get at line 296 : Capturef

Metorphium19 commented 1 year ago

Hey, The fix is fairly simple.

Hope it helps! I didn't even intended to attempt in fixing it as I have no knowledge about shaders whatsoever, but turns out it's just a missing reference.

TitouanLEFROU commented 1 year ago

Hey, thank you very much for your help. It did solve the problem. Indeed i was so focus on the shader code that i didn't checked for this. Thanks again for your help and your precise explanation.