more sprite mesh rendering
parent
d537993530
commit
808d50ccc2
20
Renderer.cs
20
Renderer.cs
|
@ -199,11 +199,12 @@ namespace Kav
|
||||||
public void RenderMeshSpriteGBuffer(
|
public void RenderMeshSpriteGBuffer(
|
||||||
RenderTargetBinding[] gBuffer,
|
RenderTargetBinding[] gBuffer,
|
||||||
PerspectiveCamera camera,
|
PerspectiveCamera camera,
|
||||||
IEnumerable<MeshSpriteDrawData> meshSpriteDrawDatas
|
IEnumerable<MeshSpriteDrawData> meshSpriteDrawDatas,
|
||||||
|
DepthStencilState depthStencilState
|
||||||
) {
|
) {
|
||||||
GraphicsDevice.SetRenderTargets(gBuffer);
|
GraphicsDevice.SetRenderTargets(gBuffer);
|
||||||
GraphicsDevice.RasterizerState = RasterizerState.CullNone;
|
GraphicsDevice.RasterizerState = RasterizerState.CullNone;
|
||||||
GraphicsDevice.DepthStencilState = DepthStencilState.Default;
|
GraphicsDevice.DepthStencilState = depthStencilState;
|
||||||
GraphicsDevice.BlendState = BlendState.AlphaBlend;
|
GraphicsDevice.BlendState = BlendState.AlphaBlend;
|
||||||
|
|
||||||
Deferred_GBufferEffect.HardwareInstancingEnabled = false;
|
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(
|
public void RenderSkybox(
|
||||||
RenderTarget2D renderTarget,
|
RenderTarget2D renderTarget,
|
||||||
PerspectiveCamera camera,
|
PerspectiveCamera camera,
|
||||||
|
|
Loading…
Reference in New Issue