Code: Select all
refEntity_t ent;
memset (&ent, 0, sizeof(ent));
VectorCopy( cent->lerpOrigin, ent.origin);
AnglesToAxis( cent->lerpAngles, ent.axis );
ent.hModel = cgs.inlineDrawModel[s1->modelindex];
ent.customShader = cgs.media.quadShader;
So I'm wondering if there is any way at all to change the shader for a specific instance of an entity. This is different from the "remap shader" entity tags level designers can use; that's no good to me because it changes every usage of that shader in the level.
It seems quite possible in theory, but in practice it would require building something new into the renderer code, then building a bridge from that to the game/cgame code (much like trap_R_RemapShader does for that feature). Is there an easier way to do it than this?