Commit 47c2e19e authored by Christopher Tenter's avatar Christopher Tenter
Browse files

move lighting code from VertexBegin to VertexEnd

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@20107 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 71ebc9ce
......@@ -1159,15 +1159,6 @@ void ShaderProgGenerator::addVertexBeginCode(QStringList* _code)
if (ioDesc_.inputColor_)
_code->push_back("sg_cColor = inColor;");
if (desc_.shadeMode == SG_SHADE_GOURAUD ||
desc_.shadeMode == SG_SHADE_FLAT)
{
// add lighting code here
addLightingCode(_code);
}
// apply modifiers
for (size_t i = 0; i < activeMods_.size(); ++i)
......@@ -1177,6 +1168,14 @@ void ShaderProgGenerator::addVertexBeginCode(QStringList* _code)
void ShaderProgGenerator::addVertexEndCode(QStringList* _code)
{
if (desc_.shadeMode == SG_SHADE_GOURAUD ||
desc_.shadeMode == SG_SHADE_FLAT)
{
// add lighting code here
addLightingCode(_code);
}
_code->push_back("gl_Position = sg_vPosPS;");
_code->push_back("outVertexPosCS = sg_vPosPS;");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment