The List of CG Inputs

Right now, we seem to have two pages that document potential shader-inputs: the “List of Possible Cg Shader Inputs”, and the “List of GLSL Shader Inputs”.

But of course, the former page notes that support for CG will be falling away in a future version of Panda. Well and good.

However, at least some (all?) of the inputs on that page also work in GLSL (with a bit of adjustment for the differences between languages). And those are not listed on the GLSL page!

Which brings me to my questions:

First, when CG support falls away, what will happen to those inputs? Will they still be available, or will they fall away too?

Second, if they’re staying, should I perhaps propose a documentation pull-request to incorporate them into the GLSL page?

And third, either way, are there equivalents already available (or planned) that more fit the style of the GLSL inputs?

What works in GLSL is any input beginning with one of the following prefixes:

  • mstrans_
  • wstrans_
  • vstrans_
  • cstrans_
  • mspos_
  • wspos_
  • vspos_
  • cspos_
  • trans_
  • tpose_
  • row#_ (where # is an integer 0-3)
  • col#_ (where # is an integer 0-3)
  • mat_
  • inv_
  • tps_
  • itp_
  • p3d_
  • osg_

There is no plan to remove the Cg-style inputs right now. Cg will still be supported in 1.11 (albeit deprecated), and removing the inputs is not on the roadmap.

Good to know, and thank you! :slight_smile:

Aah, fair enough! I’m glad to read it–especially that the removal of the inputs is not intended!

Okay, in that case I might only make a simple pull-request proposing that those inputs be added to the GLSL page, so that all that’s available in GLSL is listed there, and there’s no ambiguity in the docs as to which Cg inputs are available in GLSL!