I'm working on implementing multipass shading in a project I'm working on and I came across this thread from several years back which helped me out quite a bit in understanding what would be necessary for creating a multipass solution:
http://www.ogre3d.org/forums/viewtopic.php?f=10&t=32936
I wanted to ask a question about multipass shading however, more specifically something in the thread posted by Praetor:
The underlined part is what my question is about... I haven't been able to find much information on where the material's texture should be applied, e.g. which pass, before x, after y, etc. I was able to find an article here:Unlimited lights is just a nice flexible system. Obviously you just have to make sure you don't go crazy with it. I implemented this with a 2d engine recently, and Sinbad put in some nice facilities to support a similar technique in Ogre. Here's the strategy:
1. Do an ambient pass
2. Group lights together somehow (you're lucky, Ogre does this for you)
3. Run one pass per group of lights (I usually do 4 lights per pass, you can also use the diffuse texture here to properly light it)
4. *MAYBE* if you didn't feed the diffuse texture into the passes you need to modulate it onto the object here. Not as accurate, but does the trick.
http://digital-lighting.150m.com/ch11lev1sec3.html
which outlined different types of passes and what should be included in them but it seems to be geared more towards passes in software like Maya or Blender. Is there even a difference between the passes used by these software solutions and the passes you would use in a material in Ogre?
Anyways back to the original question: where should the material's texture be applied if I have for example a texture being applied called "rock.png" (clarification that I'm not talking about a diffuse/specular texture or similar.) Should it be included in the ambient pass as the article above suggests, should it be saved for the end after everything else is done or is there another place it should be applied other than the two I mentioned?
If somebody could help me out it would be much appreciated since I haven't been able to find all that much information about it.