Implement gl_FrontFacing for fragment shaders.
For the time being, we put the gl_FrontFacing value in the FOGC.Y input register. Combining FOGC and FrontFacing in one register is a bit of a hack and may need to be changed someday.
This commit is contained in:
@@ -113,6 +113,10 @@ init_machine(GLcontext *ctx, struct gl_program_machine *machine,
|
||||
|
||||
/* Setup pointer to input attributes */
|
||||
machine->Attribs = span->array->attribs;
|
||||
|
||||
/* Store front/back facing value in register FOGC.Y */
|
||||
machine->Attribs[FRAG_ATTRIB_FOGC][col][1] = (GLfloat) ctx->_Facing;
|
||||
|
||||
machine->CurElement = col;
|
||||
|
||||
/* init condition codes */
|
||||
|
Reference in New Issue
Block a user