diff --git a/specter/lib/RootView.cpp b/specter/lib/RootView.cpp index e50f808f4..49789fd12 100644 --- a/specter/lib/RootView.cpp +++ b/specter/lib/RootView.cpp @@ -16,7 +16,7 @@ RootView::RootView(IViewManager& viewMan, ViewResources& res, boo::IWindow* wind { buildResources(ctx, res); m_splitMenuSystem.emplace(*this, ctx); - m_renderTex = ctx.newRenderTexture(rect.size[0], rect.size[1], boo::TextureClampMode::Repeat, 3, 3); + m_renderTex = ctx.newRenderTexture(rect.size[0], rect.size[1], boo::TextureClampMode::ClampToEdge, 3, 3); return true; }); resized(rect, rect); diff --git a/specter/lib/TextView.cpp b/specter/lib/TextView.cpp index 549a29227..7ad1d40fe 100644 --- a/specter/lib/TextView.cpp +++ b/specter/lib/TextView.cpp @@ -224,14 +224,15 @@ void TextView::Resources::init(boo::MetalDataFactory::Context& ctx, FontCache* f static const char* FSReg = "#include \n" "using namespace metal;\n" - "constexpr sampler samp(address::repeat);\n" "struct VertToFrag\n" "{\n" " float4 position [[ position ]];\n" " float3 uv;\n" " float4 color;\n" "};\n" - "fragment float4 fmain(VertToFrag vtf [[ stage_in ]], texture2d_array fontTex [[ texture(0) ]])\n" + "fragment float4 fmain(VertToFrag vtf [[ stage_in ]],\n" + " sampler samp [[ sampler(0) ]],\n" + " texture2d_array fontTex [[ texture(0) ]])\n" "{\n" " float4 colorOut = vtf.color;\n" " colorOut.a *= fontTex.sample(samp, vtf.uv.xy, vtf.uv.z).r;\n" @@ -257,7 +258,7 @@ void TextView::Resources::init(boo::MetalDataFactory::Context& ctx, FontCache* f m_vtxFmt = ctx.newVertexFormat(13, vdescs); m_regular = - ctx.newShaderPipeline(VS, FSReg, nullptr, nullptr, m_vtxFmt, 1, + ctx.newShaderPipeline(VS, FSReg, nullptr, nullptr, m_vtxFmt, boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, boo::ZTest::None, false, true, false, boo::CullMode::None); } diff --git a/specter/lib/View.cpp b/specter/lib/View.cpp index 4510b5b94..60c81344b 100644 --- a/specter/lib/View.cpp +++ b/specter/lib/View.cpp @@ -253,14 +253,15 @@ void View::Resources::init(boo::MetalDataFactory::Context& ctx, const IThemeData static const char* TexFS = "#include \n" "using namespace metal;\n" - "constexpr sampler samp(address::repeat);\n" "struct VertToFrag\n" "{\n" " float4 position [[ position ]];\n" " float4 color;\n" " float2 uv;\n" "};\n" - "fragment float4 fmain(VertToFrag vtf [[ stage_in ]], texture2d tex [[ texture(0) ]])\n" + "fragment float4 fmain(VertToFrag vtf [[ stage_in ]],\n" + " sampler samp [[ sampler(0) ]],\n" + " texture2d tex [[ texture(0) ]])\n" "{\n" " return tex.sample(samp, vtf.uv) * vtf.color;\n" "}\n"; @@ -272,7 +273,7 @@ void View::Resources::init(boo::MetalDataFactory::Context& ctx, const IThemeData }; m_solidVtxFmt = ctx.newVertexFormat(2, solidvdescs); - m_solidShader = ctx.newShaderPipeline(SolidVS, SolidFS, nullptr, nullptr, m_solidVtxFmt, 1, + m_solidShader = ctx.newShaderPipeline(SolidVS, SolidFS, nullptr, nullptr, m_solidVtxFmt, boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, boo::ZTest::None, false, true, false, boo::CullMode::None); @@ -283,7 +284,7 @@ void View::Resources::init(boo::MetalDataFactory::Context& ctx, const IThemeData }; m_texVtxFmt = ctx.newVertexFormat(2, texvdescs); - m_texShader = ctx.newShaderPipeline(TexVS, TexFS, nullptr, nullptr, m_texVtxFmt, 1, + m_texShader = ctx.newShaderPipeline(TexVS, TexFS, nullptr, nullptr, m_texVtxFmt, boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, boo::ZTest::None, false, true, false, boo::CullMode::None); } diff --git a/specter/zeus b/specter/zeus index c466fd21d..f82efe058 160000 --- a/specter/zeus +++ b/specter/zeus @@ -1 +1 @@ -Subproject commit c466fd21d1cbca1371ee92e062cbb43770e50657 +Subproject commit f82efe058341810dec71954bf11eb21222059403