more sprite mesh rendering
parent
9bd7f84d26
commit
c69e659ba5
20
Renderer.cs
20
Renderer.cs
|
@ -199,11 +199,12 @@ namespace Kav
|
|||
public void RenderMeshSpriteGBuffer(
|
||||
RenderTargetBinding[] gBuffer,
|
||||
PerspectiveCamera camera,
|
||||
IEnumerable<MeshSpriteDrawData> meshSpriteDrawDatas
|
||||
IEnumerable<MeshSpriteDrawData> meshSpriteDrawDatas,
|
||||
DepthStencilState depthStencilState
|
||||
) {
|
||||
GraphicsDevice.SetRenderTargets(gBuffer);
|
||||
GraphicsDevice.RasterizerState = RasterizerState.CullNone;
|
||||
GraphicsDevice.DepthStencilState = DepthStencilState.Default;
|
||||
GraphicsDevice.DepthStencilState = depthStencilState;
|
||||
GraphicsDevice.BlendState = BlendState.AlphaBlend;
|
||||
|
||||
Deferred_GBufferEffect.HardwareInstancingEnabled = false;
|
||||
|
@ -377,6 +378,21 @@ namespace Kav
|
|||
);
|
||||
}
|
||||
|
||||
public void RenderDepthIndexed<T>(
|
||||
RenderTarget2D renderTarget,
|
||||
PerspectiveCamera camera,
|
||||
T drawable,
|
||||
DepthStencilState depthStencilState
|
||||
) where T : IIndexDrawable {
|
||||
GraphicsDevice.SetRenderTarget(renderTarget);
|
||||
GraphicsDevice.DepthStencilState = depthStencilState;
|
||||
|
||||
SimpleDepthEffect.View = camera.View;
|
||||
SimpleDepthEffect.Projection = camera.Projection;
|
||||
|
||||
RenderIndexed(GraphicsDevice, drawable, SimpleDepthEffect);
|
||||
}
|
||||
|
||||
public void RenderSkybox(
|
||||
RenderTarget2D renderTarget,
|
||||
PerspectiveCamera camera,
|
||||
|
|
Loading…
Reference in New Issue