Apply patch by vlj to improve rendering, thanks a lot!
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14739 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
@@ -521,13 +521,36 @@ void MLAANeigh3Provider::OnSetConstants(IMaterialRendererServices *srv, int)
|
||||
|
||||
void SSAOProvider::OnSetConstants(IMaterialRendererServices *srv, int)
|
||||
{
|
||||
static const float array[64] = {
|
||||
0.43589, -0.9, 0.667945, 0.,
|
||||
-0.9, 0.43589, 0.667945, 0.,
|
||||
-0.8, -0.6, 0.7, 0.,
|
||||
0.6, 0.8, 0.7, 0.,
|
||||
0.866025, -0.5, 0.6830125, 0.,
|
||||
-0.5, 0.866025, 0.6830125, 0.,
|
||||
-0.3, -0.953939, 0.6269695, 0.,
|
||||
0.953939, 0.3, 0.6269695, 0.,
|
||||
0.3, -0.781025, 0.5405125, 0.,
|
||||
-0.781025, 0.3, 0.5405125, 0.,
|
||||
-0.56, -0.621611, 0.5908055, 0.,
|
||||
0.621611, 0.56, 0.5908055, 0.,
|
||||
0.734847, -0.4, 0.5674235, 0.,
|
||||
-0.4, 0.734847, 0.5674235, 0.,
|
||||
-0.2, -0.6, 0.4, 0.,
|
||||
0.6, 0.2, 0.4, 0.,
|
||||
};
|
||||
|
||||
srv->setPixelShaderConstant("invprojm", invprojm.pointer(), 16);
|
||||
srv->setPixelShaderConstant("projm", projm.pointer(), 16);
|
||||
srv->setPixelShaderConstant("samplePoints[0]", array, 64);
|
||||
|
||||
if (!firstdone)
|
||||
{
|
||||
int tex = 0;
|
||||
srv->setPixelShaderConstant("tex", &tex, 1);
|
||||
srv->setPixelShaderConstant("normals_and_depth", &tex, 1);
|
||||
|
||||
tex = 1;
|
||||
srv->setPixelShaderConstant("oldtex", &tex, 1);
|
||||
srv->setPixelShaderConstant("depth", &tex, 1);
|
||||
|
||||
firstdone = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user