I’m trying to compile this simple vertex shader:
[code]// setup inputs
uniform sampler2D pointPosition;
uniform float pointsPerInstance;
in float pointIndex;
void main()
{
// create the uv from point index
vec2 uv;
uv.x = (pointIndex * pointsPerInstance) + (pointsPerInstance * 0.5);
uv.y = 0.5;
// sample the noise texture using the uv
vec4 newPosition = texture(pointPosition, uv);
// set point size to your liking
gl_PointSize = 1.0;
// move point from object space to screen space and output to gl_Position
vec4 worldSpaceVert = TDDeform(newPosition);
vec4 camSpaceVert = uTDMat.cam * worldSpaceVert;
gl_Position = TDCamToProj(camSpaceVert);
}[/code]
But the Info DAT returns me this error:
Vertex Shader Compile Results:
ERROR: 0:21: Use of undeclared identifier ‘uTDMat’
ERROR: 0:22: Use of undeclared identifier 'camSpace
I’m using TouchDesigner 0.99 on Mac Os Sierra.
Thanks in advance.