mirror of https://github.com/AxioDL/metaforce.git
Ensure lighting extension is passed vec3
This commit is contained in:
parent
cded4dfe1d
commit
03cb7cf237
|
@ -1 +1 @@
|
|||
Subproject commit 82966931f86d3d52732b21962a44a42cb6b14730
|
||||
Subproject commit 4a19ac1e8352740db781012b523fefe1132672f3
|
|
@ -262,7 +262,7 @@ std::string GLSL::makeFrag(const char* glslVer, bool alphaTest,
|
|||
if (m_lighting)
|
||||
{
|
||||
if (lighting.m_entry)
|
||||
retval += hecl::Format(" vec4 lighting = %s(vtf.mvPos, vtf.mvNorm);\n", lighting.m_entry);
|
||||
retval += hecl::Format(" vec4 lighting = %s(vtf.mvPos.xyz, normalize(vtf.mvNorm.xyz));\n", lighting.m_entry);
|
||||
else
|
||||
retval += " vec4 lighting = vec4(1.0,1.0,1.0,1.0);\n";
|
||||
}
|
||||
|
@ -341,7 +341,7 @@ std::string GLSL::makeFrag(const char* glslVer, bool alphaTest,
|
|||
if (m_lighting)
|
||||
{
|
||||
if (lighting.m_entry)
|
||||
retval += hecl::Format(" vec4 lighting = %s(vtf.mvPos, vtf.mvNorm);\n", lighting.m_entry);
|
||||
retval += hecl::Format(" vec4 lighting = %s(vtf.mvPos.xyz, normalize(vtf.mvNorm.xyz));\n", lighting.m_entry);
|
||||
else
|
||||
retval += " vec4 lighting = vec4(1.0,1.0,1.0,1.0);\n";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -277,7 +277,7 @@ std::string Metal::makeFrag(size_t blockCount, const char** blockNames, bool alp
|
|||
if (m_lighting)
|
||||
{
|
||||
if (lighting.m_entry)
|
||||
retval += hecl::Format(" float4 lighting = %s(%s, vtf.mvPos, vtf.mvNorm, vtf);\n", lighting.m_entry, blockCall.c_str());
|
||||
retval += hecl::Format(" float4 lighting = %s(%s, vtf.mvPos.xyz, normalize(vtf.mvNorm.xyz), vtf);\n", lighting.m_entry, blockCall.c_str());
|
||||
else
|
||||
retval += " float4 lighting = float4(1.0,1.0,1.0,1.0);\n";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue