all public facing renderer functions take an RT
parent
56cdffdff6
commit
665ff6dd44
|
@ -178,6 +178,7 @@ namespace Kav
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DeferredRender(
|
public void DeferredRender(
|
||||||
|
RenderTarget2D renderTarget,
|
||||||
PerspectiveCamera camera,
|
PerspectiveCamera camera,
|
||||||
IEnumerable<(Model, Matrix)> modelTransforms,
|
IEnumerable<(Model, Matrix)> modelTransforms,
|
||||||
AmbientLight ambientLight,
|
AmbientLight ambientLight,
|
||||||
|
@ -200,8 +201,7 @@ namespace Kav
|
||||||
|
|
||||||
DirectionalLightRender(camera, modelTransforms, directionalLight);
|
DirectionalLightRender(camera, modelTransforms, directionalLight);
|
||||||
|
|
||||||
GraphicsDevice.SetRenderTarget(null);
|
GraphicsDevice.SetRenderTarget(renderTarget);
|
||||||
GraphicsDevice.Clear(Color.Black);
|
|
||||||
SpriteBatch.Begin(SpriteSortMode.Deferred, BlendState.Opaque, null, null, null, ToneMapEffect);
|
SpriteBatch.Begin(SpriteSortMode.Deferred, BlendState.Opaque, null, null, null, ToneMapEffect);
|
||||||
SpriteBatch.Draw(ColorRenderTarget, Vector2.Zero, Color.White);
|
SpriteBatch.Draw(ColorRenderTarget, Vector2.Zero, Color.White);
|
||||||
SpriteBatch.End();
|
SpriteBatch.End();
|
||||||
|
|
Loading…
Reference in New Issue