Add shadow test to sprites

This commit is contained in:
Magnus Norddahl 2017-03-08 00:34:08 +01:00
commit 850e61d1c9
5 changed files with 139 additions and 26 deletions

View file

@ -105,4 +105,9 @@ void FShadowMap::UploadLights()
glBindBuffer(GL_SHADER_STORAGE_BUFFER, mLightList);
glBufferData(GL_SHADER_STORAGE_BUFFER, sizeof(float) * mLights.Size(), &mLights[0], GL_STATIC_DRAW);
glBindBuffer(GL_SHADER_STORAGE_BUFFER, oldBinding);
}
}
bool FShadowMap::ShadowTest(ADynamicLight *light, const DVector3 &pos)
{
return mLightBSP.ShadowTest(light->Pos(), pos);
}