- fixed: enable shadow maps on Intel cards if it is otherwise supported.

This commit is contained in:
Rachael Alexanderson 2017-03-11 01:05:56 -05:00
parent 818fcfea10
commit 70e80c152b
4 changed files with 7 additions and 3 deletions

View file

@ -109,7 +109,7 @@ bool FShadowMap::ShadowTest(ADynamicLight *light, const DVector3 &pos)
bool FShadowMap::IsEnabled() const
{
return gl_light_shadowmap && !!(gl.flags & RFL_SHADER_STORAGE_BUFFER);
return gl_light_shadowmap && (!!(gl.flags & RFL_SHADER_STORAGE_BUFFER) || gl.intelstoragebuffer);
}
int FShadowMap::ShadowMapIndex(ADynamicLight *light)

View file

@ -105,7 +105,7 @@ bool FShader::Load(const char * name, const char * vert_prog_lump, const char *
vp_comb << "#define USE_QUAD_DRAWER\n";
}
if (!!(gl.flags & RFL_SHADER_STORAGE_BUFFER))
if (!!(gl.flags & RFL_SHADER_STORAGE_BUFFER) || gl.intelstoragebuffer)
{
vp_comb << "#define SUPPORTS_SHADOWMAPS\n";
}

View file

@ -238,6 +238,10 @@ void gl_LoadExtensions()
{
gl.flags |= RFL_SHADER_STORAGE_BUFFER;
}
else
{ // [SP] Shadowmaps support for intel
gl.intelstoragebuffer = true;
}
}
gl.flags |= RFL_BUFFER_STORAGE;
gl.lightmethod = LM_DIRECT;

View file

@ -67,7 +67,7 @@ struct RenderContext
char * vendorstring;
bool legacyMode;
bool es;
bool intelstoragebuffer = false; // this card supports storage buffers, but it was disabled because it was Intel (used for shadowmaps)
int MaxLights() const
{
return maxuniforms>=2048? 128:64;