Generate random value for SSAO sampling

It should improve SSAO at least with grass.
However this make the algorithm even more sensitive to bad normals.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14758 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
vincentlj
2013-12-23 18:14:02 +00:00
parent 352009b2ce
commit a9db4c7c3f
3 changed files with 16 additions and 21 deletions

View File

@@ -494,25 +494,6 @@ 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);