Hooked up the directional light colour and directional light intensity parameters from the scene graph

--HG--
extra : convert_revision : svn%3A7752d6cf-9f14-4ad2-affc-04f1e67b81a5/trunk%4053
This commit is contained in:
kearwood
2012-04-20 02:02:33 +00:00
parent 1df9ac00ca
commit 167a18f3a7
9 changed files with 59 additions and 27 deletions

View File

@@ -58,7 +58,12 @@ void KRDirectionalLight::render(KRCamera *pCamera, KRContext *pContext, KRBoundi
KRShader *pShader = pContext->getShaderManager()->getShader("light_directional", pCamera, false, false, false, 0, false, false, false, false, false, false, false, gBufferPass);
pShader->bind(pCamera, matModelToView, mvpmatrix, cameraPosition, light_direction, pShadowMatrices, shadowDepthTextures, 0, gBufferPass);
glUniform3f(
pShader->m_uniforms[KRShader::KRENGINE_UNIFORM_LIGHT_COLOR],
m_color.x * m_intensity / 100.0f,
m_color.y * m_intensity / 100.0f,
m_color.z * m_intensity / 100.0f
);
// Render a full screen quad
static const GLfloat squareVertices[] = {