mirror of https://github.com/AxioDL/metaforce.git
Default colorRegs when lighting uniform not available
This commit is contained in:
parent
7e42581cf0
commit
b7143c7dca
|
@ -194,6 +194,13 @@ std::string GLSL::makeFrag(const char* glslVer, bool alphaTest,
|
|||
std::string lightingSrc;
|
||||
if (lighting.m_source)
|
||||
lightingSrc = lighting.m_source;
|
||||
else
|
||||
lightingSrc = "UBINDING2 uniform LightingUniform\n"
|
||||
"{\n"
|
||||
" vec4 colorReg0;\n"
|
||||
" vec4 colorReg1;\n"
|
||||
" vec4 colorReg2;\n"
|
||||
"};\n";
|
||||
|
||||
std::string texMapDecl;
|
||||
for (unsigned i=0 ; i<m_texMapEnd ; ++i)
|
||||
|
@ -242,6 +249,13 @@ std::string GLSL::makeFrag(const char* glslVer, bool alphaTest,
|
|||
std::string lightingSrc;
|
||||
if (lighting.m_source)
|
||||
lightingSrc = lighting.m_source;
|
||||
else
|
||||
lightingSrc = "UBINDING2 uniform LightingUniform\n"
|
||||
"{\n"
|
||||
" vec4 colorReg0;\n"
|
||||
" vec4 colorReg1;\n"
|
||||
" vec4 colorReg2;\n"
|
||||
"};\n";
|
||||
|
||||
std::string postSrc;
|
||||
if (post.m_source)
|
||||
|
|
|
@ -185,6 +185,13 @@ std::string HLSL::makeFrag(bool alphaTest, const ShaderFunction& lighting) const
|
|||
std::string lightingSrc;
|
||||
if (lighting.m_source)
|
||||
lightingSrc = lighting.m_source;
|
||||
else
|
||||
lightingSrc = "cbuffer LightingUniform : register(b2)\n"
|
||||
"{\n"
|
||||
" float4 colorReg0;\n"
|
||||
" float4 colorReg1;\n"
|
||||
" float4 colorReg2;\n"
|
||||
"};\n";
|
||||
|
||||
std::string texMapDecl;
|
||||
if (m_texMapEnd)
|
||||
|
@ -228,6 +235,13 @@ std::string HLSL::makeFrag(bool alphaTest, const ShaderFunction& lighting,
|
|||
std::string lightingSrc;
|
||||
if (lighting.m_source)
|
||||
lightingSrc = lighting.m_source;
|
||||
else
|
||||
lightingSrc = "cbuffer LightingUniform : register(b2)\n"
|
||||
"{\n"
|
||||
" float4 colorReg0;\n"
|
||||
" float4 colorReg1;\n"
|
||||
" float4 colorReg2;\n"
|
||||
"};\n";
|
||||
|
||||
std::string postSrc;
|
||||
if (post.m_source)
|
||||
|
|
Loading…
Reference in New Issue