Every material consists of global keywords and stages. Stages are classified into ambient stages and interaction stages (diffuse, specular, bump, parallax). Interaction stages are partitioned into interaction groups. Each group is rendered as single draw call with interaction shader, its stages supply various settings (e.g. diffuse texture is taken from diffuse stage, specular texture from specular stage, etc.). Ambient stages are all extracted into separate list and rendered in their r