Merge branch 'shadowmaps' of https://github.com/raa-eruanna/qzdoom into 3.0_work

# Conflicts:
#	src/CMakeLists.txt
#	wadsrc/static/language.enu
This commit is contained in:
Christoph Oelckers 2017-03-11 19:55:43 +01:00
commit 9eae422dab
20 changed files with 994 additions and 5 deletions

View file

@ -950,6 +950,8 @@ void FGLRenderer::RenderView (player_t* player)
TThinkerIterator<ADynamicLight> it(STAT_DLIGHT);
GLRenderer->mLightCount = ((it.Next()) != NULL);
GLRenderer->mShadowMap.Update();
sector_t * viewsector = RenderViewpoint(player->camera, NULL, FieldOfView.Degrees, ratio, fovratio, true, true);
All.Unclock();

View file

@ -91,7 +91,7 @@ void gl_SetDynSpriteLight(AActor *self, float x, float y, float z, subsector_t *
frac = 1.0f - (dist / radius);
if (frac > 0)
if (frac > 0 && GLRenderer->mShadowMap.ShadowTest(light, { x, y, z }))
{
lr = light->GetRed() / 255.0f;
lg = light->GetGreen() / 255.0f;