Login | Register 
FEATURES
APPLICATIONS
DOWNLOADS
EDUCATION
BLOG
WIKI
FORUM
STORE

RESOLVED: uTDMat error

Report bugs so we can squash them!

RESOLVED: uTDMat error

Postby paolofuse » Mon Jul 17, 2017 6:09 am

I'm trying to compile this simple vertex shader:

Code: Select all
// 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);
}


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.
paolofuse
 
Posts: 2
Joined: Thu Jul 13, 2017 1:16 pm

Re: uTDMat error

Postby paolofuse » Mon Jul 17, 2017 6:30 am

Well I found that the problem was to set the Lighting Space of GLSL on Camera Space (Legacy 088 shaders).
paolofuse
 
Posts: 2
Joined: Thu Jul 13, 2017 1:16 pm


Return to Bugs

Who is online

Users browsing this forum: No registered users and 2 guests