mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-29 15:12:11 +00:00
- fixed: enable shadow maps on Intel cards if it is otherwise supported.
This commit is contained in:
parent
818fcfea10
commit
70e80c152b
4 changed files with 7 additions and 3 deletions
|
@ -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)
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue