Cg and front/back fragments?

Is there any way to differentiate between front and back fragments in Cg like there is in GLSL (gl_FrontColor, gl_BackColor)?

The way I differentiate them is I call one variable “FrontColor” and the other “BackColor”.

That way I don’t get them mixed up.

Don’t know how it works in Cg but I expect it’s similar.

Well in GLSL you can set both gl_FrontColor and gl_BackColor in the vertex program and gl_Color in the fragment program will be either the front or back color based on the front/back state of the fragment. I am just wondering Cg has a similar convention.

I figured it out: either vertex program COL0/BCOL0 gets put into COLOR0 in the fragment program if GL_VERTEX_PROGRAM_TWO_SIDE is enabled.