renderer/vulkan: Make gl_Position invariant. (#48)
This fixes an issue with black artifacts in Pokemon games on Apple GPUs. If the vertex calculations differ slightly between render passes, it can cause parts of model faces to fail depth test.
This commit is contained in:
parent
89226eea2a
commit
edd8de29ae
1 changed files with 1 additions and 1 deletions
|
@ -46,7 +46,7 @@ static std::string GetVertexInterfaceDeclaration(bool is_output, bool use_clip_p
|
|||
if (is_output) {
|
||||
// gl_PerVertex redeclaration is required for separate shader object
|
||||
out += "out gl_PerVertex {\n";
|
||||
out += " vec4 gl_Position;\n";
|
||||
out += " invariant vec4 gl_Position;\n";
|
||||
if (use_clip_planes) {
|
||||
out += " float gl_ClipDistance[2];\n";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue