Added OpenGL support to the underwater view blend scalar option.

This commit is contained in:
nashmuhandes 2016-11-11 18:08:47 +08:00
parent d36993a03b
commit 970c750daa

View file

@ -82,6 +82,7 @@ CVAR(Bool, gl_sort_textures, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
EXTERN_CVAR (Bool, cl_capfps)
EXTERN_CVAR (Bool, r_deathcamera)
EXTERN_CVAR (Float, underwater_fade_scalar)
extern int viewpitch;
@ -602,7 +603,11 @@ void FGLRenderer::DrawBlend(sector_t * viewsector)
}
else if (blendv.a)
{
V_AddBlend(blendv.r / 255.f, blendv.g / 255.f, blendv.b / 255.f, blendv.a / 255.0f, blend);
// [Nash] allow user to set blend intensity
int cnt = blendv.a;
cnt = (int)(cnt * underwater_fade_scalar);
V_AddBlend(blendv.r / 255.f, blendv.g / 255.f, blendv.b / 255.f, cnt / 255.0f, blend);
}
}