I have managed to get this to work, finnally! Thanks to everyone who tried to help me
This tecnique might not be very efficient but does appear to work, to render particles with the defered shading pipeline I added the following
Code:
<Stage id="Attribpass">
<SwitchTarget target="GBUFFER" />
<ClearTarget depthBuf="true" colBuf0="true" />
<DrawGeometry context="ATTRIBPASS" />
</Stage>
<!-- Apply lighting and shadows -->
<Stage id="Lighting" link="globalSettings.material.xml">
<SwitchTarget target="" />
<ClearTarget colBuf0="true" />
<BindBuffer texUnit="8" target="GBUFFER" bufIndex="0" />
<BindBuffer texUnit="9" target="GBUFFER" bufIndex="1" />
<BindBuffer texUnit="10" target="GBUFFER" bufIndex="2" />
<DrawQuad material="light.material.xml" context="AMBIENT" />
<DoDeferredLightLoop />
</Stage>
<!-- Render particles and other translucent objects -->
<Stage id="Translucent">
<SwitchTarget target="GBUFFER" />
<ClearTarget depthBuf="false" colBuf0="true" />
<DrawGeometry context="TRANSLUCENT" class="Translucent"/>
<SwitchTarget target="" />
<BindBuffer texUnit="0" target="GBUFFER" bufIndex="0" />
<DrawQuad material="util.material.xml" context="DO_COLOUR" />
</Stage>
The shader for DO_COLOUR simply copys over the fragments using ADD_BLENDED to blend them to whats already rendered.
If anyone can offer any advice on optimising this I would be very very happy,
Thanks again