mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 21:01:52 +00:00
Render 2D with depth, reverse depth of camera projection
dirty fix in Renderer...
This commit is contained in:
@@ -392,6 +392,9 @@ namespace GlitchyEngine.Renderer
|
||||
|
||||
_lights.Clear();
|
||||
|
||||
// TODO: I don't understand why we need to clear depth here. It should happen in SceneRenderer, but doesn't work for some reason...
|
||||
RenderCommand.Clear(_sceneConstants.CompositionTarget, .Depth);
|
||||
|
||||
// Copy EntityIDs to compositionTarget
|
||||
_gBuffer.Target.CopyTo(_sceneConstants.CompositionTarget, 1, int2.Zero, int2((int32)_sceneConstants.CameraTarget.Width, (int32)_sceneConstants.CameraTarget.Height), int2.Zero, 6);
|
||||
|
||||
|
||||
@@ -758,10 +758,14 @@ namespace GlitchyEngine.Renderer
|
||||
return;
|
||||
|
||||
SortInstances();
|
||||
|
||||
RenderCommand.SetDepthStencilState(Renderer.[Friend]_meshDepthStencilState);
|
||||
|
||||
DrawDeferredQuads();
|
||||
DrawDeferredCircles();
|
||||
DrawDeferredLines();
|
||||
|
||||
RenderCommand.SetDepthStencilState(Renderer.[Friend]_fullscreenDepthState);
|
||||
}
|
||||
|
||||
private static void DrawDeferredQuads()
|
||||
|
||||
Reference in New Issue
Block a user