From 91c946cfbd039ce8c3c19da831e6801db88d67c6 Mon Sep 17 00:00:00 2001 From: prideout Date: Fri, 18 Jan 2019 13:08:45 -0800 Subject: [PATCH] Add workaround for depth invariance on NVIDIA. Fixes #645. --- shaders/src/depth_main.vs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/shaders/src/depth_main.vs b/shaders/src/depth_main.vs index 9ddd6c861e..662dfed2e6 100644 --- a/shaders/src/depth_main.vs +++ b/shaders/src/depth_main.vs @@ -1,9 +1,14 @@ +// The sole purpose of this no-op function is to improve parity between the depth vertex shader +// and color vertex shader, thus working around a variance issue seen with NVIDIA drivers. +void materialVertex(inout MaterialVertexInputs m) { } + void main() { #if defined(VERTEX_DOMAIN_DEVICE) gl_Position = getSkinnedPosition(); #else MaterialVertexInputs material; initMaterialVertex(material); + materialVertex(material); gl_Position = getClipFromWorldMatrix() * material.worldPosition; #endif