mirror of https://github.com/AxioDL/metaforce.git
More D3D fixes
This commit is contained in:
parent
45fb8db388
commit
a2da358fd3
|
@ -145,7 +145,7 @@ static std::string_view MainPostHLSL =
|
||||||
" break;\n"
|
" break;\n"
|
||||||
" }\n"
|
" }\n"
|
||||||
"#ifdef BLEND_DST_ONE\n"
|
"#ifdef BLEND_DST_ONE\n"
|
||||||
" return float4(lerp(colorIn, float4(0.0), saturate(fogZ)).rgb, colorIn.a);\n"
|
" return float4(lerp(colorIn, float4(0.0, 0.0, 0.0, 0.0), saturate(fogZ)).rgb, colorIn.a);\n"
|
||||||
"#else\n"
|
"#else\n"
|
||||||
" return float4(lerp(colorIn, fog.color, saturate(fogZ)).rgb, colorIn.a);\n"
|
" return float4(lerp(colorIn, fog.color, saturate(fogZ)).rgb, colorIn.a);\n"
|
||||||
"#endif\n"
|
"#endif\n"
|
||||||
|
|
|
@ -290,7 +290,7 @@ static const char* FS =
|
||||||
" break;\n"
|
" break;\n"
|
||||||
" }\n"
|
" }\n"
|
||||||
"#if %d\n"
|
"#if %d\n"
|
||||||
" return float4(lerp(colorIn, float4(0.0), saturate(fogZ)).rgb, colorIn.a);\n"
|
" return float4(lerp(colorIn, float4(0.0, 0.0, 0.0, 0.0), saturate(fogZ)).rgb, colorIn.a);\n"
|
||||||
"#else\n"
|
"#else\n"
|
||||||
" return float4(lerp(colorIn, fog.color, saturate(fogZ)).rgb, colorIn.a);\n"
|
" return float4(lerp(colorIn, fog.color, saturate(fogZ)).rgb, colorIn.a);\n"
|
||||||
"#endif\n"
|
"#endif\n"
|
||||||
|
@ -671,19 +671,19 @@ static std::string _BuildAdditionalTCGs(const SFluidPlaneShaderInfo& info)
|
||||||
|
|
||||||
if (info.m_hasBumpMap)
|
if (info.m_hasBumpMap)
|
||||||
{
|
{
|
||||||
additionalTCGs += hecl::Format(" vtf.uvs[%d] = (texMtxs[0] * pos).xy;\n", nextTCG++);
|
additionalTCGs += hecl::Format(" vtf.uvs[%d] = mul(texMtxs[0], pos).xy;\n", nextTCG++);
|
||||||
}
|
}
|
||||||
if (info.m_hasEnvBumpMap)
|
if (info.m_hasEnvBumpMap)
|
||||||
{
|
{
|
||||||
additionalTCGs += hecl::Format(" vtf.uvs[%d] = (texMtxs[3] * vec4(normalIn.xyz, 1.0)).xy;\n", nextTCG++);
|
additionalTCGs += hecl::Format(" vtf.uvs[%d] = mul(texMtxs[3], float4(normalIn.xyz, 1.0)).xy;\n", nextTCG++);
|
||||||
}
|
}
|
||||||
if (info.m_hasEnvMap)
|
if (info.m_hasEnvMap)
|
||||||
{
|
{
|
||||||
additionalTCGs += hecl::Format(" vtf.uvs[%d] = (texMtxs[%d] * pos).xy;\n", nextTCG++, nextMtx++);
|
additionalTCGs += hecl::Format(" vtf.uvs[%d] = mul(texMtxs[%d], pos).xy;\n", nextTCG++, nextMtx++);
|
||||||
}
|
}
|
||||||
if (info.m_hasLightmap)
|
if (info.m_hasLightmap)
|
||||||
{
|
{
|
||||||
additionalTCGs += hecl::Format(" vtf.uvs[%d] = (texMtxs[%d] * pos).xy;\n", nextTCG, nextMtx);
|
additionalTCGs += hecl::Format(" vtf.uvs[%d] = mul(texMtxs[%d], pos).xy;\n", nextTCG, nextMtx);
|
||||||
}
|
}
|
||||||
|
|
||||||
return additionalTCGs;
|
return additionalTCGs;
|
||||||
|
|
Loading…
Reference in New Issue