diff --git a/src/video_core/renderer_metal/mtl_pipeline_cache.cpp b/src/video_core/renderer_metal/mtl_pipeline_cache.cpp index e80b3eb3e0..d142ccbf89 100644 --- a/src/video_core/renderer_metal/mtl_pipeline_cache.cpp +++ b/src/video_core/renderer_metal/mtl_pipeline_cache.cpp @@ -279,10 +279,10 @@ std::unique_ptr PipelineCache::CreateGraphicsPipeline( #include using namespace metal; - constant float2 texCoords[] = { - float2(0.0, -1.0), - float2(0.0, 1.0), - float2(2.0, 1.0), + constant float2 positions[] = { + float2(-1.0, -3.0), + float2(-1.0, 1.0), + float2( 3.0, 1.0), }; struct VertexOut { @@ -292,8 +292,9 @@ std::unique_ptr PipelineCache::CreateGraphicsPipeline( vertex VertexOut vertexMain(uint vid [[vertex_id]]) { VertexOut out; - out.position = float4(texCoords[vid] * 2.0 - 1.0, 0.0, 1.0); - out.texCoord = texCoords[vid]; + out.position = float4(positions[vid], 0.0, 1.0); + out.texCoord = positions[vid] * 0.5 + 0.5; + out.texCoord.y = 1.0 - out.texCoord.y; return out; } diff --git a/src/video_core/renderer_metal/renderer_metal.cpp b/src/video_core/renderer_metal/renderer_metal.cpp index e0a0031d08..efb83743c6 100644 --- a/src/video_core/renderer_metal/renderer_metal.cpp +++ b/src/video_core/renderer_metal/renderer_metal.cpp @@ -80,10 +80,10 @@ void RendererMetal::CreateBlitPipelineState() { #include using namespace metal; - constant float2 texCoords[] = { - float2(0.0, -1.0), - float2(0.0, 1.0), - float2(2.0, 1.0), + constant float2 positions[] = { + float2(-1.0, -3.0), + float2(-1.0, 1.0), + float2( 3.0, 1.0), }; struct VertexOut { @@ -93,8 +93,9 @@ void RendererMetal::CreateBlitPipelineState() { vertex VertexOut vertexMain(uint vid [[vertex_id]]) { VertexOut out; - out.position = float4(texCoords[vid] * 2.0 - 1.0, 0.0, 1.0); - out.texCoord = texCoords[vid]; + out.position = float4(positions[vid], 0.0, 1.0); + out.texCoord = positions[vid] * 0.5 + 0.5; + out.texCoord.y = 1.0 - out.texCoord.y; return out; }