2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-10 06:27:43 +00:00

Various fixes

This commit is contained in:
Jack Andersen
2017-12-09 19:30:01 -10:00
parent 5e03278eff
commit 8901ac2150
16 changed files with 179 additions and 141 deletions

View File

@@ -169,61 +169,61 @@ CModelShaders::GetShaderExtensionsHLSL(boo::IGraphicsDataFactory::Platform plat)
ext.registerExtensionSlot({LightingHLSL, "LightingFunc"}, {MainPostHLSL, "MainPostFunc"},
0, nullptr, 0, nullptr, hecl::Backend::BlendFactor::Original,
hecl::Backend::BlendFactor::Original, hecl::Backend::ZTest::Original,
false, false, false, true);
hecl::Backend::CullMode::Backface, false, false, true);
/* Thermal Visor shading */
ext.registerExtensionSlot({}, {ThermalPostHLSL, "ThermalPostFunc"}, 0, nullptr,
1, ThermalTextures, hecl::Backend::BlendFactor::One,
hecl::Backend::BlendFactor::One, hecl::Backend::ZTest::Original,
false, false, false, true);
hecl::Backend::CullMode::Backface, false, false, true);
/* Forced alpha shading */
ext.registerExtensionSlot({LightingHLSL, "LightingFunc"}, {MainPostHLSL, "MainPostFunc"},
0, nullptr, 0, nullptr, hecl::Backend::BlendFactor::SrcAlpha,
hecl::Backend::BlendFactor::InvSrcAlpha, hecl::Backend::ZTest::Original,
false, false, false, true);
hecl::Backend::CullMode::Backface, false, false, true);
/* Forced additive shading */
ext.registerExtensionSlot({LightingHLSL, "LightingFunc"}, {MainPostHLSL, "MainPostFunc"},
0, nullptr, 0, nullptr, hecl::Backend::BlendFactor::SrcAlpha,
hecl::Backend::BlendFactor::One, hecl::Backend::ZTest::Original,
false, true, false, true);
hecl::Backend::CullMode::Backface, true, false, true);
/* Solid color */
ext.registerExtensionSlot({}, {SolidPostHLSL, "SolidPostFunc"},
0, nullptr, 0, nullptr, hecl::Backend::BlendFactor::One,
hecl::Backend::BlendFactor::Zero, hecl::Backend::ZTest::LEqual,
false, false, false, false);
hecl::Backend::CullMode::Backface, false, false, false);
/* Solid color additive */
ext.registerExtensionSlot({}, {SolidPostHLSL, "SolidPostFunc"},
0, nullptr, 0, nullptr, hecl::Backend::BlendFactor::SrcAlpha,
hecl::Backend::BlendFactor::One, hecl::Backend::ZTest::LEqual,
false, true, false, true);
hecl::Backend::CullMode::Backface, true, false, true);
/* Alpha-only Solid color frontface cull, LEqual */
ext.registerExtensionSlot({}, {SolidPostHLSL, "SolidPostFunc"},
0, nullptr, 0, nullptr, hecl::Backend::BlendFactor::One,
hecl::Backend::BlendFactor::Zero, hecl::Backend::ZTest::LEqual,
true, false, true, false);
hecl::Backend::CullMode::Frontface, false, true, false);
/* Alpha-only Solid color frontface cull, Always, No Z-write */
ext.registerExtensionSlot({}, {SolidPostHLSL, "SolidPostFunc"},
0, nullptr, 0, nullptr, hecl::Backend::BlendFactor::One,
hecl::Backend::BlendFactor::Zero, hecl::Backend::ZTest::None,
true, true, true, false);
hecl::Backend::CullMode::Frontface, true, true, false);
/* Alpha-only Solid color backface cull, LEqual */
ext.registerExtensionSlot({}, {SolidPostHLSL, "SolidPostFunc"},
0, nullptr, 0, nullptr, hecl::Backend::BlendFactor::One,
hecl::Backend::BlendFactor::Zero, hecl::Backend::ZTest::LEqual,
false, false, true, false);
hecl::Backend::CullMode::Backface, false, true, false);
/* Alpha-only Solid color backface cull, Greater, No Z-write */
ext.registerExtensionSlot({}, {SolidPostHLSL, "SolidPostFunc"},
0, nullptr, 0, nullptr, hecl::Backend::BlendFactor::One,
hecl::Backend::BlendFactor::Zero, hecl::Backend::ZTest::Greater,
false, true, true, false);
hecl::Backend::CullMode::Backface, true, true, false);
/* MorphBall shadow shading */
ext.registerExtensionSlot({}, {MBShadowPostHLSL, "MBShadowPostFunc"},
@@ -231,13 +231,25 @@ CModelShaders::GetShaderExtensionsHLSL(boo::IGraphicsDataFactory::Platform plat)
hecl::Backend::BlendFactor::SrcAlpha,
hecl::Backend::BlendFactor::InvSrcAlpha,
hecl::Backend::ZTest::Equal,
false, false, false, true, true);
hecl::Backend::CullMode::Backface, false, false, true, true);
/* World shadow shading (modified lighting) */
ext.registerExtensionSlot({LightingShadowHLSL, "LightingShadowFunc"}, {MainPostHLSL, "MainPostFunc"},
0, nullptr, 1, WorldShadowTextures, hecl::Backend::BlendFactor::Original,
hecl::Backend::BlendFactor::Original, hecl::Backend::ZTest::Original,
false, false, false, true);
hecl::Backend::CullMode::Backface, false, false, true);
/* Forced alpha shading without culling */
ext.registerExtensionSlot({LightingHLSL, "LightingFunc"}, {MainPostHLSL, "MainPostFunc"},
0, nullptr, 0, nullptr, hecl::Backend::BlendFactor::SrcAlpha,
hecl::Backend::BlendFactor::InvSrcAlpha, hecl::Backend::ZTest::Original,
hecl::Backend::CullMode::None, false, false, true);
/* Forced additive shading without culling */
ext.registerExtensionSlot({LightingHLSL, "LightingFunc"}, {MainPostHLSL, "MainPostFunc"},
0, nullptr, 0, nullptr, hecl::Backend::BlendFactor::SrcAlpha,
hecl::Backend::BlendFactor::One, hecl::Backend::ZTest::Original,
hecl::Backend::CullMode::None, true, false, true);
return ext;
}