2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-20 12:59:12 +00:00

Ensure lighting extension is passed vec3

This commit is contained in:
Jack Andersen
2018-06-06 18:36:46 -10:00
parent cded4dfe1d
commit 03cb7cf237
4 changed files with 6 additions and 6 deletions

View File

@@ -249,7 +249,7 @@ std::string HLSL::makeFrag(bool alphaTest, ReflectionType reflectionType,
if (m_lighting)
{
if (lighting.m_entry)
retval += hecl::Format(" float4 lighting = %s(vtf.mvPos, vtf.mvNorm, vtf);\n", lighting.m_entry);
retval += hecl::Format(" float4 lighting = %s(vtf.mvPos.xyz, normalize(vtf.mvNorm.xyz), vtf);\n", lighting.m_entry);
else
retval += " float4 lighting = float4(1.0,1.0,1.0,1.0);\n";
}
@@ -324,7 +324,7 @@ std::string HLSL::makeFrag(bool alphaTest, ReflectionType reflectionType,
if (m_lighting)
{
if (lighting.m_entry)
retval += hecl::Format(" float4 lighting = %s(vtf.mvPos, vtf.mvNorm, vtf);\n", lighting.m_entry);
retval += hecl::Format(" float4 lighting = %s(vtf.mvPos.xyz, normalize(vtf.mvNorm.xyz), vtf);\n", lighting.m_entry);
else
retval += " float4 lighting = float4(1.0,1.0,1.0,1.0);\n";
}