Template and World Position
Posted: Wed Nov 28, 2018 10:13 pm
Hello,
I'm making a new template, Within the VertexOutput I'm embedding the "worldPos" by default.
However, when I add it, other nodes using the worldPos generate errors, as it's already declared
A cheap solution will be to rename my default variable in worldPosition, but I was wandering if I could use a flag or something similar?
I'm making a new template, Within the VertexOutput I'm embedding the "worldPos" by default.
However, when I add it, other nodes using the worldPos generate errors, as it's already declared
- Code: Select all
struct VertexOutput
{
float4 clipPos : SV_POSITION;
float3 worldPos : TEXCOORD0;
/*ase_interp(0,):sp=sp.xyzw;*/
UNITY_VERTEX_INPUT_INSTANCE_ID
UNITY_VERTEX_OUTPUT_STEREO
};
A cheap solution will be to rename my default variable in worldPosition, but I was wandering if I could use a flag or something similar?