Add the callback for the color correction shader

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14631 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
samuncle
2013-12-04 14:21:27 +00:00
parent 85bfec00a0
commit 6b0962f876
5 changed files with 43 additions and 1 deletions

View File

@@ -142,6 +142,26 @@ void GrassShaderProvider::OnSetConstants(IMaterialRendererServices *srv, int use
//-------------------------------------
void ColorLevelsProvider::OnSetConstants(IMaterialRendererServices *srv, int userData)
{
m_inlevel = vector3df(0.0, 0.65, 137.0);
m_outlevel = vector2df(0.0, 255.0);
srv->setVertexShaderConstant("inlevel", &m_inlevel.X, 3);
srv->setVertexShaderConstant("outlevel", &m_outlevel.X, 2);
if (!firstdone)
{
s32 tex = 0;
srv->setVertexShaderConstant("tex", &tex, 1);
firstdone = true;
}
}
//-------------------------------------
void SplattingProvider::OnSetConstants(IMaterialRendererServices *srv, int)
{
const float camfar = irr_driver->getSceneManager()->getActiveCamera()->getFarValue();