Skip to content

Fix shader compilation for NVIDIA 384.69

NVIDIA Linux Driver 384.69 (possibly also earlier, but that's the one I currently use) refuses to compile GLSL shaders which are not fragment shaders and are accessing gl_FragDepth inside a function, even if this function is not used.

It results in the following error:

Vertex info
-----------
5(352) : error C5052: gl_FragDepth is not accessible in this profile
(0) : error C2003: incompatible options for link

Here, it affected the function computeDepthFromWorld(), for which I simply moved the assignment to gl_FragDepth to the respective calls.

Merge request reports