mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-22 20:20:05 +00:00
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
@ -46,7 +46,7 @@ static std::string GetVertexInterfaceDeclaration(bool is_output, bool use_clip_p
|
|||||||
if (is_output) {
|
if (is_output) {
|
||||||
// gl_PerVertex redeclaration is required for separate shader object
|
// gl_PerVertex redeclaration is required for separate shader object
|
||||||
out += "out gl_PerVertex {\n";
|
out += "out gl_PerVertex {\n";
|
||||||
out += " vec4 gl_Position;\n";
|
out += " invariant vec4 gl_Position;\n";
|
||||||
if (use_clip_planes) {
|
if (use_clip_planes) {
|
||||||
out += " float gl_ClipDistance[2];\n";
|
out += " float gl_ClipDistance[2];\n";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user