"Restauration" of old GLSL shaders

Hi,

I’m trying to translate an older GLSL 1.2 shader. I looked at the the GLSL Material - Wiki and TD specific uniforms to find the equivalent uniforms but I’m still a bit unsure which is which, like these:

  • gl_ModelViewMatrix
  • gl_Vertex
  • gl_NormalMatrix
  • gl_Normal
  • gl_TextureMatrix
  • ftransform() function

Where can I look up these?

Cheers
Marcus

1 Like

I’ll update the wiki with this information, but the answers are:

gl_ModelViewMatrix

  • uTDMats[0].worldCam

gl_Vertex

  • P

gl_NormalMatrix

  • uTDMats[0].worldCamForNormals

gl_Normal

  • N

gl_TextureMatrix

  • Not used

ftransform() function

  • This is basically gl_Position = TDWorldToProj(TDDeform(P));

Awesome, Thanks!