more sprite mesh rendering
parent
d537993530
commit
808d50ccc2
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