jsedlak

Ok. I am trying to write a SceneManager that contains a list of RenderGroup. Each RenderGroup is responsible for rendering a set of items (models, etc) to a RenderTarget and then rendering their RenderTarget to the BackBuffer (in this case a RenderTarget that SceneManager sets).

The Problem: Blending between RenderTargets is not working. I have it working so when a RenderTarget is rendered multiple times with separate passes in the PixelShader it blends in Add mode. Between to RenderTargets, or RenderGroups in this case the blending fails. No matter what order I have the RenderGroups setup, it just won't blend correctly.

Here is a picture of what I am trying to do:

http://images.jsedlak.org/random/Xna5D_SceneManager.jpg

Here is the code...

RenderGroup: https://opensvn.csie.org/viewcvs.cgi/Windows/Xna5D/Xna5D.Graphics3D/RenderGroup.cs root=Xna5D&view=markup

SceneManager: https://opensvn.csie.org/viewcvs.cgi/Windows/Xna5D/Xna5D.Graphics3D/SceneManager.cs root=Xna5D&view=markup

Game1.cs: https://opensvn.csie.org/viewcvs.cgi/Windows/Xna5D_PostProcessing/Xna5D_PostProcessing/Xna5D_PostProcessing/Game1.cs root=Xna5D&view=markup

Or maybe there is a better way to go about this




Re: XNA Framework Blending Multiple RenderTargets to the BackBuffer (Another RT)

jsedlak

I figured it out... count is 2 times now that I have made a stupid mistake. I wasn't keeping the master RenderTarget alive, plus I was clearing it on every RenderGroup for some odd reason.

I also had to change the RenderState setup a bit.