mirror of https://github.com/AxioDL/metaforce.git
CModelShaders: Disable Z-test for LightingAlphaWrite
Permits static thermal hot objects to render properly
This commit is contained in:
parent
9a7bceb637
commit
6ff305da06
|
@ -578,7 +578,7 @@ static EExtendedShader ResolveExtendedShader(const MaterialSet::Material& data,
|
||||||
if (intermediateExtended == EExtendedShader::Lighting) {
|
if (intermediateExtended == EExtendedShader::Lighting) {
|
||||||
/* Transform lighting into thermal cold if the thermal visor is active */
|
/* Transform lighting into thermal cold if the thermal visor is active */
|
||||||
if (g_Renderer->IsThermalVisorHotPass())
|
if (g_Renderer->IsThermalVisorHotPass())
|
||||||
return EExtendedShader::LightingAlphaWrite;
|
return EExtendedShader::LightingAlphaWriteNoZTest;
|
||||||
else if (g_Renderer->IsThermalVisorActive())
|
else if (g_Renderer->IsThermalVisorActive())
|
||||||
return EExtendedShader::ThermalCold;
|
return EExtendedShader::ThermalCold;
|
||||||
if (data.blendMode == MaterialSet::Material::BlendMaterial::BlendMode::Opaque) {
|
if (data.blendMode == MaterialSet::Material::BlendMaterial::BlendMode::Opaque) {
|
||||||
|
|
|
@ -149,9 +149,9 @@ static std::array<hecl::Backend::ExtensionSlot, 26> g_ExtensionSlots{{
|
||||||
/* Thermal cold shading */
|
/* Thermal cold shading */
|
||||||
{0, nullptr, hecl::Backend::BlendFactor::Original, hecl::Backend::BlendFactor::Original,
|
{0, nullptr, hecl::Backend::BlendFactor::Original, hecl::Backend::BlendFactor::Original,
|
||||||
hecl::Backend::ZTest::Original, hecl::Backend::CullMode::Original, false, false, true, false, false, false, true},
|
hecl::Backend::ZTest::Original, hecl::Backend::CullMode::Original, false, false, true, false, false, false, true},
|
||||||
/* Normal lit shading with alpha */
|
/* Normal lit shading with alpha without depth test */
|
||||||
{0, nullptr, hecl::Backend::BlendFactor::Original, hecl::Backend::BlendFactor::Original,
|
{0, nullptr, hecl::Backend::BlendFactor::Original, hecl::Backend::BlendFactor::Original,
|
||||||
hecl::Backend::ZTest::Original, hecl::Backend::CullMode::Backface},
|
hecl::Backend::ZTest::None, hecl::Backend::CullMode::Backface},
|
||||||
/* Normal lit shading with cube reflection */
|
/* Normal lit shading with cube reflection */
|
||||||
{0, nullptr, hecl::Backend::BlendFactor::Original, hecl::Backend::BlendFactor::Original,
|
{0, nullptr, hecl::Backend::BlendFactor::Original, hecl::Backend::BlendFactor::Original,
|
||||||
hecl::Backend::ZTest::Original, hecl::Backend::CullMode::Backface, false, false, true},
|
hecl::Backend::ZTest::Original, hecl::Backend::CullMode::Backface, false, false, true},
|
||||||
|
|
|
@ -45,7 +45,7 @@ enum class EExtendedShader : uint8_t {
|
||||||
Disintegrate,
|
Disintegrate,
|
||||||
ForcedAdditiveNoZWriteDepthGreater,
|
ForcedAdditiveNoZWriteDepthGreater,
|
||||||
ThermalCold,
|
ThermalCold,
|
||||||
LightingAlphaWrite,
|
LightingAlphaWriteNoZTest,
|
||||||
LightingCubeReflection,
|
LightingCubeReflection,
|
||||||
LightingCubeReflectionWorldShadow,
|
LightingCubeReflectionWorldShadow,
|
||||||
MAX
|
MAX
|
||||||
|
|
Loading…
Reference in New Issue