mirror of https://github.com/AxioDL/metaforce.git
CPauseScreenBlur fixes
This commit is contained in:
parent
0edac28ed4
commit
d14763ca19
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ CTexturedQuadFilter::CTexturedQuadFilter(const boo::ObjToken<boo::ITexture>& tex
|
|||
CTexturedQuadFilter::CTexturedQuadFilter(EFilterType type, const boo::ObjToken<boo::ITexture>& 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);
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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 <metal_stdlib>\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 <metal_stdlib>\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;
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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<CTexturedQuadFilter&>(m_quarterFilter).DrawFilter(EFilterShape::FullscreenQuarters, filterColor, t * (31.f/32.f));
|
||||
const_cast<CTexturedQuadFilter&>(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<CScanLinesFilterEven&>(m_linesFilter).draw(scanLinesColor);
|
||||
//const_cast<CScanLinesFilterEven&>(m_linesFilter).draw(scanLinesColor);
|
||||
}
|
||||
|
||||
if (x50_24_blurring /*&& x1c_camBlur.x2d_noPersistentCopy*/)
|
||||
|
|
2
hecl
2
hecl
|
@ -1 +1 @@
|
|||
Subproject commit b57b00da0be1d40be7b413b923f1de0ddb432735
|
||||
Subproject commit 47e0feda0dffb476757d78cbb07c7500a16185e6
|
2
specter
2
specter
|
@ -1 +1 @@
|
|||
Subproject commit 2ad799ced38bd484d5afd5f56e677e0075f7da03
|
||||
Subproject commit 45c81ae955c52c9cf185c643879b3436595f5b06
|
Loading…
Reference in New Issue