summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/D3D12/Render.cpp
diff options
context:
space:
mode:
authorJules Blok <jules.blok@gmail.com>2016-08-15 15:25:50 +0200
committerJules Blok <jules.blok@gmail.com>2016-08-16 21:09:58 +0200
commit7078216b61777ff89350d1bdc66c7c032b0b2296 (patch)
tree16c1ec3a1ecbb44e7806224113fc08a17febe9af /Source/Core/VideoBackends/D3D12/Render.cpp
parent8c1c7fc2da65eea1a8244ce196d94313f7fdfb1b (diff)
Improve documentation.
Diffstat (limited to 'Source/Core/VideoBackends/D3D12/Render.cpp')
-rw-r--r--Source/Core/VideoBackends/D3D12/Render.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/Core/VideoBackends/D3D12/Render.cpp b/Source/Core/VideoBackends/D3D12/Render.cpp
index 09e7356259..912cd4908d 100644
--- a/Source/Core/VideoBackends/D3D12/Render.cpp
+++ b/Source/Core/VideoBackends/D3D12/Render.cpp
@@ -482,8 +482,10 @@ void Renderer::SetViewport()
width = (x + width <= GetTargetWidth()) ? width : (GetTargetWidth() - x);
height = (y + height <= GetTargetHeight()) ? height : (GetTargetHeight() - y);
- D3D12_VIEWPORT vp = {x, y, width, height, D3D12_MIN_DEPTH, 16777215.0f / 16777216.0f};
-
+ // We do depth clipping and depth range in the vertex shader instead of relying
+ // on the graphics API. However we still need to ensure depth values don't exceed
+ // the maximum value supported by the console GPU.
+ D3D12_VIEWPORT vp = {x, y, width, height, D3D12_MIN_DEPTH, GX_MAX_DEPTH};
D3D::current_command_list->RSSetViewports(1, &vp);
}