all public facing renderer functions take an RT

sprites
cosmonaut 2020-12-04 15:49:35 -08:00
parent 56cdffdff6
commit 665ff6dd44
1 changed files with 2 additions and 2 deletions

View File

@ -178,6 +178,7 @@ namespace Kav
}
public void DeferredRender(
RenderTarget2D renderTarget,
PerspectiveCamera camera,
IEnumerable<(Model, Matrix)> modelTransforms,
AmbientLight ambientLight,
@ -200,8 +201,7 @@ namespace Kav
DirectionalLightRender(camera, modelTransforms, directionalLight);
GraphicsDevice.SetRenderTarget(null);
GraphicsDevice.Clear(Color.Black);
GraphicsDevice.SetRenderTarget(renderTarget);
SpriteBatch.Begin(SpriteSortMode.Deferred, BlendState.Opaque, null, null, null, ToneMapEffect);
SpriteBatch.Draw(ColorRenderTarget, Vector2.Zero, Color.White);
SpriteBatch.End();