and I’m having trouble setting the gl_Postion in the vertex shader in the GLSL_Top. For one thing, I am not really sure how to convert the model, view, projection matrices into the appropriate touch functions. I had thought the TDWorldToProj or perhaps something in the matrix struct ‘uTDMat’ would be the answer but when I try to use any of the predefined variables like uTDMat.world or functions like TDWorldToProj I get undefined variable error:
A shader written for the GLSL TOP is generally a image based operation. It does essentially no geometry based work. So a GLSL TOP is simply a shader applied to a single quad that is drawn to cover up the entire viewport (also known as a full-screen-aligned quad). So generally you don’t manipulate the vertex position in a GLSL TOP, as it will cause the quad to not be aligned with the TOP output.
that makes sense, thanks. I was able to port the shaders to a glsl material, however when I make a sphere sop and apply it, I only see the result I’m after with the ‘primitive’ geometric primitive type. With the ‘mesh’, ‘polygon’, ‘nurb’, the mapping is in a narrow band around the xy plane. I don’t understand why
Code removes errors, but still doesn’t give the results that the book provides. I’m trying to figure it out today, if I find a solution I’ll repost here.
Right, that should be the correct solution. I’ve submitted a change to the book for that. Thanks for pointing it out. If you can post your latest file I can take a look at that.
Applied the GLSL MAT to the Geometry COMP, now I see the actual dot, just need to get the noise to change the point position, I’ll try and work on it some this weekend.