Hi @LorRrR and welcome,
Can you elaborate on how exactly are you structuring your code and shader?
In general if you are looking to leverage lighting/shadows then you should avoid writing a custom shader but instead use shader chunks (override part of the internal PlayCanvas rendering code). Example project:
https://developer.playcanvas.com/en/tutorials/tutorial-plasma-shader-chunk/
https://developer.playcanvas.com/en/tutorials/custom-shaders/
I just copied shader project files into my project, but this error appears, and disappears when I turn off cast shadow either on render component or light comp.
As I said, you can’t use a custom shaders with PlayCanvas lighting/shadows. You need to use shader chunks for that.
Thank you!
Is there a tutorial on how to use shader chunks specifically for cast shadows?
Shaders generated for shadows casting are stripped down shaders from the standard material used in the forward pass. Not sure what’s the recommended way to override that, but a good place to study is the shadows pass here: