mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-13 06:46:10 +00:00
Refactors to support fog volume rendering
This commit is contained in:
@@ -114,33 +114,64 @@ CModelShaders::GetShaderExtensionsMetal(boo::IGraphicsDataFactory::Platform plat
|
||||
/* Normal lit shading */
|
||||
ext.registerExtensionSlot({LightingMetal, "LightingFunc"}, {MainPostMetal, "MainPostFunc"},
|
||||
1, BlockNames, 0, nullptr, hecl::Backend::BlendFactor::Original,
|
||||
hecl::Backend::BlendFactor::Original);
|
||||
hecl::Backend::BlendFactor::Original, hecl::Backend::ZTest::Original,
|
||||
false, false, false, true);
|
||||
|
||||
/* Thermal Visor shading */
|
||||
ext.registerExtensionSlot({}, {ThermalPostMetal, "ThermalPostFunc"}, 1, ThermalBlockNames,
|
||||
1, ThermalTextures, hecl::Backend::BlendFactor::One,
|
||||
hecl::Backend::BlendFactor::One);
|
||||
hecl::Backend::BlendFactor::One, hecl::Backend::ZTest::Original,
|
||||
false, false, false, true);
|
||||
|
||||
/* Forced alpha shading */
|
||||
ext.registerExtensionSlot({LightingMetal, "LightingFunc"}, {MainPostMetal, "MainPostFunc"},
|
||||
1, BlockNames, 0, nullptr, hecl::Backend::BlendFactor::SrcAlpha,
|
||||
hecl::Backend::BlendFactor::InvSrcAlpha);
|
||||
hecl::Backend::BlendFactor::InvSrcAlpha, hecl::Backend::ZTest::Original,
|
||||
false, false, false, true);
|
||||
|
||||
/* Forced additive shading */
|
||||
ext.registerExtensionSlot({LightingMetal, "LightingFunc"}, {MainPostMetal, "MainPostFunc"},
|
||||
1, BlockNames, 0, nullptr, hecl::Backend::BlendFactor::One,
|
||||
hecl::Backend::BlendFactor::One);
|
||||
hecl::Backend::BlendFactor::One, hecl::Backend::ZTest::Original,
|
||||
false, false, false, true);
|
||||
|
||||
/* Solid shading */
|
||||
/* Solid color */
|
||||
ext.registerExtensionSlot({}, {SolidPostMetal, "SolidPostFunc"},
|
||||
1, SolidBlockNames, 0, nullptr, hecl::Backend::BlendFactor::One,
|
||||
hecl::Backend::BlendFactor::Zero);
|
||||
hecl::Backend::BlendFactor::Zero, hecl::Backend::ZTest::LEqual,
|
||||
false, false, false, false);
|
||||
|
||||
/* Alpha-only Solid color frontface cull, LEqual */
|
||||
ext.registerExtensionSlot({}, {SolidPostMetal, "SolidPostFunc"},
|
||||
1, SolidBlockNames, 0, nullptr, hecl::Backend::BlendFactor::Zero,
|
||||
hecl::Backend::BlendFactor::One, hecl::Backend::ZTest::LEqual,
|
||||
true, false, true, false);
|
||||
|
||||
/* Alpha-only Solid color frontface cull, Always, No Z-write */
|
||||
ext.registerExtensionSlot({}, {SolidPostMetal, "SolidPostFunc"},
|
||||
1, SolidBlockNames, 0, nullptr, hecl::Backend::BlendFactor::Zero,
|
||||
hecl::Backend::BlendFactor::One, hecl::Backend::ZTest::None,
|
||||
true, true, true, false);
|
||||
|
||||
/* Alpha-only Solid color backface cull, LEqual */
|
||||
ext.registerExtensionSlot({}, {SolidPostMetal, "SolidPostFunc"},
|
||||
1, SolidBlockNames, 0, nullptr, hecl::Backend::BlendFactor::Zero,
|
||||
hecl::Backend::BlendFactor::One, hecl::Backend::ZTest::LEqual,
|
||||
false, false, true, false);
|
||||
|
||||
/* Alpha-only Solid color backface cull, Greater, No Z-write */
|
||||
ext.registerExtensionSlot({}, {SolidPostMetal, "SolidPostFunc"},
|
||||
1, SolidBlockNames, 0, nullptr, hecl::Backend::BlendFactor::Zero,
|
||||
hecl::Backend::BlendFactor::One, hecl::Backend::ZTest::Greater,
|
||||
false, true, true, false);
|
||||
|
||||
/* MorphBall shadow shading */
|
||||
ext.registerExtensionSlot({}, {MBShadowPostMetal, "MBShadowPostFunc"},
|
||||
1, MBShadowBlockNames, 3, BallFadeTextures,
|
||||
hecl::Backend::BlendFactor::SrcAlpha,
|
||||
hecl::Backend::BlendFactor::InvSrcAlpha);
|
||||
hecl::Backend::BlendFactor::InvSrcAlpha,
|
||||
hecl::Backend::ZTest::Equal,
|
||||
false, false, false, true);
|
||||
|
||||
return ext;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user