diff --git a/Runtime/Graphics/Shaders/CColoredQuadFilterMetal.cpp b/Runtime/Graphics/Shaders/CColoredQuadFilterMetal.cpp index 5e5b5edf4..fcacadcc2 100644 --- a/Runtime/Graphics/Shaders/CColoredQuadFilterMetal.cpp +++ b/Runtime/Graphics/Shaders/CColoredQuadFilterMetal.cpp @@ -98,8 +98,8 @@ CColoredQuadFilter::Initialize(boo::MetalDataFactory::Context& ctx) boo::BlendFactor::One, boo::Primitive::TriStrips, boo::ZTest::None, false, true, true, boo::CullMode::None); s_MultPipeline = ctx.newShaderPipeline(VS, FS, nullptr, nullptr, - s_VtxFmt, CGraphics::g_ViewportSamples, boo::BlendFactor::SrcColor, - boo::BlendFactor::DstColor, boo::Primitive::TriStrips, + s_VtxFmt, CGraphics::g_ViewportSamples, boo::BlendFactor::Zero, + boo::BlendFactor::SrcColor, boo::Primitive::TriStrips, boo::ZTest::None, false, true, true, boo::CullMode::None); return new CColoredQuadFilterMetalDataBindingFactory; } diff --git a/Runtime/Graphics/Shaders/CRandomStaticFilterMetal.cpp b/Runtime/Graphics/Shaders/CRandomStaticFilterMetal.cpp index f585c6f31..0fe0dca9b 100644 --- a/Runtime/Graphics/Shaders/CRandomStaticFilterMetal.cpp +++ b/Runtime/Graphics/Shaders/CRandomStaticFilterMetal.cpp @@ -169,8 +169,8 @@ CRandomStaticFilter::Initialize(boo::MetalDataFactory::Context& ctx) boo::ZTest::None, false, true, false, boo::CullMode::None); s_MultPipeline = ctx.newShaderPipeline(VS, FS, nullptr, nullptr, s_VtxFmt, CGraphics::g_ViewportSamples, - boo::BlendFactor::SrcColor, - boo::BlendFactor::DstColor, boo::Primitive::TriStrips, + boo::BlendFactor::Zero, + boo::BlendFactor::SrcColor, boo::Primitive::TriStrips, boo::ZTest::None, false, true, false, boo::CullMode::None); s_CookieCutterPipeline = ctx.newShaderPipeline(VS, FSCookieCutter, nullptr, nullptr, s_VtxFmt, CGraphics::g_ViewportSamples, diff --git a/Runtime/Graphics/Shaders/CScanLinesFilterMetal.cpp b/Runtime/Graphics/Shaders/CScanLinesFilterMetal.cpp index fa5323c2c..ae678215f 100644 --- a/Runtime/Graphics/Shaders/CScanLinesFilterMetal.cpp +++ b/Runtime/Graphics/Shaders/CScanLinesFilterMetal.cpp @@ -102,8 +102,8 @@ CScanLinesFilter::Initialize(boo::MetalDataFactory::Context& ctx) boo::BlendFactor::One, boo::Primitive::TriStrips, boo::ZTest::None, false, true, true, boo::CullMode::None); s_MultPipeline = ctx.newShaderPipeline(VS, FS, nullptr, nullptr, - s_VtxFmt, CGraphics::g_ViewportSamples, boo::BlendFactor::SrcColor, - boo::BlendFactor::DstColor, boo::Primitive::TriStrips, + s_VtxFmt, CGraphics::g_ViewportSamples, boo::BlendFactor::Zero, + boo::BlendFactor::SrcColor, boo::Primitive::TriStrips, boo::ZTest::None, false, true, true, boo::CullMode::None); return new CScanLinesFilterMetalDataBindingFactory; } diff --git a/Runtime/Graphics/Shaders/CTexturedQuadFilter.cpp b/Runtime/Graphics/Shaders/CTexturedQuadFilter.cpp index 89b3ebce5..a8e4f4d2c 100644 --- a/Runtime/Graphics/Shaders/CTexturedQuadFilter.cpp +++ b/Runtime/Graphics/Shaders/CTexturedQuadFilter.cpp @@ -12,6 +12,7 @@ CTexturedQuadFilter::CTexturedQuadFilter(const boo::ObjToken& tex CTexturedQuadFilter::CTexturedQuadFilter(EFilterType type, const boo::ObjToken& tex, bool gequal) : m_booTex(tex), m_gequal(gequal) { + tex->setClampMode(boo::TextureClampMode::ClampToEdge); CGraphics::CommitResources([&](boo::IGraphicsDataFactory::Context& ctx) -> bool { m_vbo = ctx.newDynamicBuffer(boo::BufferUse::Vertex, 32, 16); @@ -99,22 +100,22 @@ void CTexturedQuadFilter::DrawFilter(EFilterShape shape, const zeus::CColor& col { Vert QuadVerts[] = { - {{-1.f, -1.f, 0.f}, {0.f, 0.f}}, - {{-1.f, 0.f, 0.f}, {0.f, t}}, - {{ 0.f, -1.f, 0.f}, {t, 0.f}}, - {{ 0.f, 0.f, 0.f}, {t, t}}, - {{-1.f, 1.f, 0.f}, {0.f, 0.f}}, - {{-1.f, 0.f, 0.f}, {0.f, t}}, - {{ 0.f, 1.f, 0.f}, {t, 0.f}}, - {{ 0.f, 0.f, 0.f}, {t, t}}, - {{ 1.f, -1.f, 0.f}, {0.f, 0.f}}, - {{ 1.f, 0.f, 0.f}, {0.f, t}}, - {{ 0.f, -1.f, 0.f}, {t, 0.f}}, - {{ 0.f, 0.f, 0.f}, {t, t}}, - {{ 1.f, 1.f, 0.f}, {0.f, 0.f}}, - {{ 1.f, 0.f, 0.f}, {0.f, t}}, - {{ 0.f, 1.f, 0.f}, {t, 0.f}}, - {{ 0.f, 0.f, 0.f}, {t, t}}, + {{-1.f, -1.f, 0.f}, {t, t}}, // ll + {{-1.f, 0.f, 0.f}, {t, 0.f}}, + {{ 0.f, -1.f, 0.f}, {0.f, t}}, + {{ 0.f, 0.f, 0.f}, {0.f, 0.f}}, + {{-1.f, 1.f, 0.f}, {t, t}}, // ul + {{-1.f, 0.f, 0.f}, {t, 0.f}}, + {{ 0.f, 1.f, 0.f}, {0.f, t}}, + {{ 0.f, 0.f, 0.f}, {0.f, 0.f}}, + {{ 1.f, -1.f, 0.f}, {t, t}}, // lr + {{ 1.f, 0.f, 0.f}, {t, 0.f}}, + {{ 0.f, -1.f, 0.f}, {0.f, t}}, + {{ 0.f, 0.f, 0.f}, {0.f, 0.f}}, + {{ 1.f, 1.f, 0.f}, {t, t}}, // ur + {{ 1.f, 0.f, 0.f}, {t, 0.f}}, + {{ 0.f, 1.f, 0.f}, {0.f, t}}, + {{ 0.f, 0.f, 0.f}, {0.f, 0.f}}, }; m_vbo->load(QuadVerts, sizeof(Vert) * 16); CGraphics::DrawArray(0, 4); diff --git a/Runtime/Graphics/Shaders/CTexturedQuadFilterGLSL.cpp b/Runtime/Graphics/Shaders/CTexturedQuadFilterGLSL.cpp index 2af1ad5bc..334b16b8a 100644 --- a/Runtime/Graphics/Shaders/CTexturedQuadFilterGLSL.cpp +++ b/Runtime/Graphics/Shaders/CTexturedQuadFilterGLSL.cpp @@ -59,7 +59,7 @@ BOO_GLSL_BINDING_HEAD "void main()\n" "{\n" " vtf.color = color;\n" -" vtf.uv = -uvIn.xy;\n" +" vtf.uv = uvIn.xy;\n" " vtf.lod = lod;\n" " gl_Position = mtx * vec4(posIn.xyz, 1.0);\n" " gl_Position = FLIPFROMGL(gl_Position);\n" diff --git a/Runtime/Graphics/Shaders/CTexturedQuadFilterHLSL.cpp b/Runtime/Graphics/Shaders/CTexturedQuadFilterHLSL.cpp index 949f7560c..8787419c8 100644 --- a/Runtime/Graphics/Shaders/CTexturedQuadFilterHLSL.cpp +++ b/Runtime/Graphics/Shaders/CTexturedQuadFilterHLSL.cpp @@ -64,7 +64,7 @@ static const char* VSNoFlip = " VertToFrag vtf;\n" " vtf.color = color;\n" " vtf.uv = v.uvIn.xy;\n" -" vtf.uv.y = -vtf.uv.y;\n" +" vtf.uv.y = 1.f - vtf.uv.y;\n" " vtf.lod = lod;\n" " vtf.position = mul(mat, float4(v.posIn.xyz, 1.0));\n" " return vtf;\n" @@ -80,7 +80,7 @@ static const char* FS = "};\n" "\n" "Texture2D tex : register(t0);\n" -"SamplerState samp : register(s0);\n" +"SamplerState samp : register(s2);\n" "\n" "float4 main(in VertToFrag vtf) : SV_Target0\n" "{\n" @@ -97,7 +97,7 @@ static const char* FSAlpha = "};\n" "\n" "Texture2D tex : register(t0);\n" -"SamplerState samp : register(s0);\n" +"SamplerState samp : register(s2);\n" "\n" "float4 main(in VertToFrag vtf) : SV_Target0\n" "{\n" diff --git a/Runtime/Graphics/Shaders/CTexturedQuadFilterMetal.cpp b/Runtime/Graphics/Shaders/CTexturedQuadFilterMetal.cpp index ac76d9605..bad1693e7 100644 --- a/Runtime/Graphics/Shaders/CTexturedQuadFilterMetal.cpp +++ b/Runtime/Graphics/Shaders/CTexturedQuadFilterMetal.cpp @@ -68,7 +68,6 @@ static const char* VSNoFlip = " VertToFrag vtf;\n" " vtf.color = tqu.color;\n" " vtf.uv = v.uvIn.xy;\n" -" vtf.uv.y = -vtf.uv.y;\n" " vtf.lod = tqu.lod;\n" " vtf.position = tqu.mat * float4(v.posIn.xyz, 1.0);\n" " return vtf;\n" @@ -78,7 +77,7 @@ static const char* VSNoFlip = static const char* FS = "#include \n" "using namespace metal;\n" -"constexpr sampler samp(address::repeat, filter::linear);\n" +"constexpr sampler samp(address::clamp_to_edge, filter::linear);\n" "struct VertToFrag\n" "{\n" " float4 position [[ position ]];\n" @@ -95,7 +94,7 @@ static const char* FS = static const char* FSAlpha = "#include \n" "using namespace metal;\n" -"constexpr sampler samp(address::repeat, filter::linear);\n" +"constexpr sampler samp(address::clamp_to_edge, filter::linear);\n" "struct VertToFrag\n" "{\n" " float4 position [[ position ]];\n" @@ -171,8 +170,8 @@ CTexturedQuadFilter::Initialize(boo::MetalDataFactory::Context& ctx) boo::BlendFactor::One, boo::Primitive::TriStrips, boo::ZTest::None, false, true, false, boo::CullMode::None); s_MultPipeline = ctx.newShaderPipeline(VSNoFlip, FS, nullptr, nullptr, - s_VtxFmt, CGraphics::g_ViewportSamples, boo::BlendFactor::SrcColor, - boo::BlendFactor::DstColor, boo::Primitive::TriStrips, boo::ZTest::None, false, + s_VtxFmt, CGraphics::g_ViewportSamples, boo::BlendFactor::Zero, + boo::BlendFactor::SrcColor, boo::Primitive::TriStrips, boo::ZTest::None, false, true, false, boo::CullMode::None); return new CTexturedQuadFilterMetalDataBindingFactory; } @@ -240,8 +239,8 @@ CTexturedQuadFilterAlpha::Initialize(boo::MetalDataFactory::Context& ctx) boo::BlendFactor::One, boo::Primitive::TriStrips, boo::ZTest::None, false, true, false, boo::CullMode::None); s_AMultPipeline = ctx.newShaderPipeline(VSFlip, FSAlpha, nullptr, nullptr, - s_AVtxFmt, CGraphics::g_ViewportSamples, boo::BlendFactor::SrcColor, - boo::BlendFactor::DstColor, boo::Primitive::TriStrips, + s_AVtxFmt, CGraphics::g_ViewportSamples, boo::BlendFactor::Zero, + boo::BlendFactor::SrcColor, boo::Primitive::TriStrips, boo::ZTest::None, false, true, false, boo::CullMode::None); return new CTexturedQuadFilterAlphaMetalDataBindingFactory; } diff --git a/Runtime/MP1/CInGameGuiManager.cpp b/Runtime/MP1/CInGameGuiManager.cpp index e28faebb1..590ef0caa 100644 --- a/Runtime/MP1/CInGameGuiManager.cpp +++ b/Runtime/MP1/CInGameGuiManager.cpp @@ -438,7 +438,8 @@ void CInGameGuiManager::Update(CStateManager& stateMgr, float dt, CArchitectureQ if (x1f0_enablePlayerVisor) x30_playerVisor->Update(dt, stateMgr); if (x1f8_25_playerAlive) - x34_samusHud->Update(dt, stateMgr, x1e0_helmetVisMode, x1ec_hudVisMode != EHudVisMode::Zero, x1e4_enableTargetingManager); + x34_samusHud->Update(dt, stateMgr, x1e0_helmetVisMode, x1ec_hudVisMode != EHudVisMode::Zero, + x1e4_enableTargetingManager); } if (x1e8_enableAutoMapper) @@ -747,7 +748,9 @@ void CInGameGuiManager::StartFadeIn() bool CInGameGuiManager::GetIsGameDraw() const { - return x3c_pauseScreenBlur->IsGameDraw(); + // Always draw world for URDE, even while paused + return true; + //return x3c_pauseScreenBlur->IsGameDraw(); } } diff --git a/Runtime/MP1/CPauseScreenBlur.cpp b/Runtime/MP1/CPauseScreenBlur.cpp index 498313365..1fa638161 100644 --- a/Runtime/MP1/CPauseScreenBlur.cpp +++ b/Runtime/MP1/CPauseScreenBlur.cpp @@ -106,10 +106,11 @@ void CPauseScreenBlur::Draw(const CStateManager&) const { zeus::CColor filterColor = zeus::CColor::lerp(zeus::CColor::skWhite, g_tweakGuiColors->GetPauseBlurFilterColor(), t); - const_cast(m_quarterFilter).DrawFilter(EFilterShape::FullscreenQuarters, filterColor, t * (31.f/32.f)); + const_cast(m_quarterFilter).DrawFilter(EFilterShape::FullscreenQuarters, + filterColor, t); zeus::CColor scanLinesColor = zeus::CColor::lerp(zeus::CColor::skWhite, zeus::CColor(0.75f, 1.f), t); - const_cast(m_linesFilter).draw(scanLinesColor); + //const_cast(m_linesFilter).draw(scanLinesColor); } if (x50_24_blurring /*&& x1c_camBlur.x2d_noPersistentCopy*/) diff --git a/hecl b/hecl index b57b00da0..47e0feda0 160000 --- a/hecl +++ b/hecl @@ -1 +1 @@ -Subproject commit b57b00da0be1d40be7b413b923f1de0ddb432735 +Subproject commit 47e0feda0dffb476757d78cbb07c7500a16185e6 diff --git a/specter b/specter index 2ad799ced..45c81ae95 160000 --- a/specter +++ b/specter @@ -1 +1 @@ -Subproject commit 2ad799ced38bd484d5afd5f56e677e0075f7da03 +Subproject commit 45c81ae955c52c9cf185c643879b3436595f5b06