   render to texture shader question.
  Hi, i'm currently designing a system to render shadows maps (and other effects needing a render to texture). I'm inspiring from the 'Engine-Shadow Integration Question' threadFirst a definition so there is no confusion : What I call a Shader is a C++ object that defines the appearance of the shaded object, it owns a HardwareProgram which is a set of HardwareShader linked together. the HardwareProgram is what runs on the 3D card.Here is the problem : When I render my shadow map, I do not care about lighting and all that, so I do not want to have a complex normal mapping HardwareProgram running. I could just force a specific HardwareProgram, but it would not work for any shader that change the depth or that discard the fragment.My idea is to add to a Shader a new, optional, HardwareProgram that is used to render the object with a uniform-given color. That way if a Shader have the optional HardwareProgram, when I render a shadow map, I use it, if not I use a default one.The question i'm asking is : is that generic enough ?I cannot think of an effect that requires rendering to texture and that needs another shader than the normal one (for reflection/refraction rendering) or the plain color one (for shadow mapping). I thought that adding a uniform to tell the color we want to render into permit effects like detecting the object edges (by rendering each object with a unique color and applying a edge detection filter on that)Do anyone have an idea of an effect I cannot get with this architecture ?Any comment ?Thanks in advance.   