2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-21 21:39:11 +00:00

Metal API adjustments; MSAA support

This commit is contained in:
Jack Andersen
2018-01-06 19:19:49 -10:00
parent fd33d05fc0
commit 4e5c991424
45 changed files with 327 additions and 281 deletions

View File

@@ -42,7 +42,6 @@ static const char* VS =
static const char* FS =
"#include <metal_stdlib>\n"
"using namespace metal;\n"
"constexpr sampler samp(address::repeat, filter::linear, mip_filter::linear);\n"
"struct VertToFrag\n"
"{\n"
" float4 position [[ position ]];\n"
@@ -51,6 +50,7 @@ static const char* FS =
"};\n"
"\n"
"fragment float4 fmain(VertToFrag vtf [[ stage_in ]],\n"
" sampler samp [[ sampler(0) ]],\n"
" texture2d<float> tex [[ texture(0) ]])\n"
"{\n"
" return vtf.color * tex.sample(samp, vtf.uv);\n"
@@ -92,8 +92,7 @@ CRadarPaintShader::Initialize(boo::MetalDataFactory::Context& ctx)
{nullptr, nullptr, boo::VertexSemantic::Color}
};
s_VtxFmt = ctx.newVertexFormat(9, VtxVmt);
s_Pipeline = ctx.newShaderPipeline(VS, FS, nullptr, nullptr,
s_VtxFmt, CGraphics::g_ViewportSamples,
s_Pipeline = ctx.newShaderPipeline(VS, FS, nullptr, nullptr, s_VtxFmt,
boo::BlendFactor::SrcAlpha,
boo::BlendFactor::One, boo::Primitive::TriStrips,
boo::ZTest::None, false, true, false, boo::CullMode::None);