Possible factors for clipping and control what is rendered by change a flag..

this
if(my.SC_SKILL != NULL) //entity has SC_SKILL
{
SC_OBJECT* ObjData = (SC_OBJECT*)(my.SC_SKILL);

if(ObjData.depth == -1) return(1); //clip from gBuffer
if(ObjData.pass != SC_PASS_GBUFFER) return(1); //only render entities which have the SC_PASS_GBUFFER flag set

But I'll have to read into more and test it all.