Question by
Timo_Ho · Aug 09, 2016 at 02:20 PM ·
shadershadowscgvertex shader
Shadow error in custom Shader
I got this shader: http://pastebin.com/p1EpDadg I simply tried to add shadows, but now It gets an error:
undeclared identifier 'ComputeScreenPos' at line 56 (on d3d11)
The line is
TRANSFER_VERTEX_TO_FRAGMENT(o)
I don't know how to fix this. please help me.
Comment
As in;
...
CGPROGRA$$anonymous$$
#pragma vertex vert
#pragma fragment frag
#pragma multi_compile_fwdbase
#include "AutoLight.cginc"
#include "UnityCG.cginc"
...
Best Answer
Answer by Timo_Ho · Aug 10, 2016 at 09:16 AM
Works now. Thanks to Namey5. I added #include "UnityCG.cginc" to my includes and removed the tag "queue" = "transparent"
Adding an include file solved a similar problem for me from a 3rd-party plugin.