mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 23:32:02 +00:00
allow brightmaps and fullbright objects in fog. The reasons why they were disabled no longer exist.
This commit is contained in:
parent
c47c7421a3
commit
506798f134
4 changed files with 2 additions and 11 deletions
|
@ -471,11 +471,9 @@ void GLFlat::Draw(int pass)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (foggy) gl_RenderState.EnableBrightmap(false);
|
||||
gltexture->Bind();
|
||||
bool pushed = gl_SetPlaneTextureRotation(&plane, gltexture);
|
||||
DrawSubsectors(pass, true);
|
||||
gl_RenderState.EnableBrightmap(true);
|
||||
if (pushed)
|
||||
{
|
||||
glPopMatrix();
|
||||
|
|
|
@ -405,7 +405,6 @@ void FGLRenderer::RenderScene(int recursion)
|
|||
gl_RenderState.EnableBrightmap(gl_fixedcolormap == CM_DEFAULT);
|
||||
gl_drawinfo->drawlists[GLDL_PLAIN].Sort();
|
||||
gl_drawinfo->drawlists[GLDL_PLAIN].Draw(pass);
|
||||
gl_RenderState.EnableBrightmap(false);
|
||||
gl_drawinfo->drawlists[GLDL_FOG].Sort();
|
||||
gl_drawinfo->drawlists[GLDL_FOG].Draw(pass);
|
||||
gl_drawinfo->drawlists[GLDL_LIGHTFOG].Sort();
|
||||
|
@ -422,10 +421,8 @@ void FGLRenderer::RenderScene(int recursion)
|
|||
}
|
||||
if (pass == GLPASS_BASE) pass = GLPASS_BASE_MASKED;
|
||||
gl_RenderState.AlphaFunc(GL_GEQUAL,gl_mask_threshold);
|
||||
gl_RenderState.EnableBrightmap(true);
|
||||
gl_drawinfo->drawlists[GLDL_MASKED].Sort();
|
||||
gl_drawinfo->drawlists[GLDL_MASKED].Draw(pass);
|
||||
gl_RenderState.EnableBrightmap(false);
|
||||
gl_drawinfo->drawlists[GLDL_FOGMASKED].Sort();
|
||||
gl_drawinfo->drawlists[GLDL_FOGMASKED].Draw(pass);
|
||||
gl_drawinfo->drawlists[GLDL_LIGHTFOGMASKED].Sort();
|
||||
|
|
|
@ -461,7 +461,6 @@ void GLWall::RenderTranslucentWall()
|
|||
int extra;
|
||||
if (gltexture)
|
||||
{
|
||||
if (flags&GLWF_FOGGY) gl_RenderState.EnableBrightmap(false);
|
||||
gl_RenderState.EnableGlow(!!(flags & GLWF_GLOW));
|
||||
gltexture->Bind(flags, 0);
|
||||
extra = getExtraLight();
|
||||
|
@ -486,7 +485,6 @@ void GLWall::RenderTranslucentWall()
|
|||
{
|
||||
gl_RenderState.EnableTexture(true);
|
||||
}
|
||||
gl_RenderState.EnableBrightmap(true);
|
||||
gl_RenderState.EnableGlow(false);
|
||||
}
|
||||
|
||||
|
|
|
@ -393,10 +393,9 @@ FShader *FShaderContainer::Bind(int cm, bool glowing, float Speed, bool lights)
|
|||
glUniform3fv(sh->colormaprange_index, 1, m);
|
||||
}
|
||||
}
|
||||
/*
|
||||
else
|
||||
{
|
||||
bool desat = cm>=CM_DESAT1 && cm<=CM_DESAT31;
|
||||
bool desat = false;// cm >= CM_DESAT1 && cm <= CM_DESAT31;
|
||||
sh = shader[glowing + 2*desat + 4*lights + (glset.lightmode & 8)];
|
||||
// [BB] If there was a problem when loading the shader, sh is NULL here.
|
||||
if( sh )
|
||||
|
@ -404,11 +403,10 @@ FShader *FShaderContainer::Bind(int cm, bool glowing, float Speed, bool lights)
|
|||
sh->Bind(Speed);
|
||||
if (desat)
|
||||
{
|
||||
glUniform1f(sh->desaturation_index, 1.f-float(cm-CM_DESAT0)/(CM_DESAT31-CM_DESAT0));
|
||||
//glUniform1f(sh->desaturation_index, 1.f-float(cm-CM_DESAT0)/(CM_DESAT31-CM_DESAT0));
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
return sh;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue