Deferred rendering and textures

So I’ve been reading about deferred rendering, and toying around with the various implementations. I’ve read several times that you can only use one material. What does this mean exactly? Does this mean that the single material (herein called deferredMaterial) - is programatically tied to the deferred rendering pipeline, and that any other material that is not deferredMaterial will just go through the regular single-pass pipeline? And if that is the case - how for example can one animate in the shader?

Well, it is not quite true that you can only use one material. In fact, you can use as many as you want. But there is only one way how materials write information to the G-buffer (color map, normal map, specular map, whatever…) Then, in the lighting pass, the scene will be lit accordingly.
So, you can still use many materials and therefore I don’t see a problem with animation.

You can still combine deferred rendering with forward rendering, if you have any materials that require it. As an example, it is not uncommon to draw the transparent stuff using a forward rendering pass, after the deferred stuff has been rendered.

EDIT: I would actually suggest to have a deferred and a forward technique for each material.

Every material you use must implement proper technique - to fill your gbuffer. In my implementation I use only one material definition which have all needed techniques.

First, you need a technique to fill your gbuffer. You’ll need something for shadows too (a copy of PreShadow from Lighting would be ok) - tread it as an interface that every object must implement. If object does not have proper techniques you can exclude it from deferred pipeline (for example particles)

For second pass you can use different material, because all you need there are information about light and, shadows and previously rendered maps. In this step you tread lights as spheres (or fullscreen quads) and you can give them different material.