mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-25 13:41:05 +00:00
Merge branch 'master' of https://github.com/coelckers/gzdoom
# Conflicts: # src/gl/scene/gl_sprite.cpp # src/polyrenderer/scene/poly_sprite.cpp # src/r_data/r_vanillatrans.cpp # src/r_data/r_vanillatrans.h # src/swrenderer/things/r_sprite.cpp
This commit is contained in:
commit
c340a6f794
6 changed files with 9 additions and 8 deletions
|
@ -670,6 +670,8 @@ void D_Display ()
|
|||
cycles.Reset();
|
||||
cycles.Clock();
|
||||
|
||||
r_UseVanillaTransparency = UseVanillaTransparency(); // [SP] Cache UseVanillaTransparency() call
|
||||
|
||||
if (players[consoleplayer].camera == NULL)
|
||||
{
|
||||
players[consoleplayer].camera = players[consoleplayer].mo;
|
||||
|
|
|
@ -76,7 +76,6 @@ CUSTOM_CVAR(Int, gl_fuzztype, 0, CVAR_ARCHIVE)
|
|||
}
|
||||
|
||||
EXTERN_CVAR (Float, transsouls)
|
||||
EXTERN_CVAR (Bool, r_vanillatrans)
|
||||
|
||||
extern TArray<spritedef_t> sprites;
|
||||
extern TArray<spriteframe_t> SpriteFrames;
|
||||
|
@ -994,7 +993,7 @@ void GLSprite::Process(AActor* thing, sector_t * sector, int thruportal)
|
|||
{
|
||||
trans = 1.f;
|
||||
}
|
||||
if (UseVanillaTransparency())
|
||||
if (r_UseVanillaTransparency)
|
||||
{
|
||||
// [SP] "canonical transparency" - with the flip of a CVar, disable transparency for Doom objects,
|
||||
// and disable 'additive' translucency for certain objects from other games.
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
|
||||
EXTERN_CVAR(Float, transsouls)
|
||||
EXTERN_CVAR(Int, r_drawfuzz)
|
||||
EXTERN_CVAR (Bool, r_vanillatrans)
|
||||
|
||||
bool RenderPolySprite::GetLine(AActor *thing, DVector2 &left, DVector2 &right)
|
||||
{
|
||||
|
@ -147,7 +146,7 @@ void RenderPolySprite::Render(const TriMatrix &worldToClip, const PolyClipPlane
|
|||
args.SetStencilTestValue(stencilValue);
|
||||
args.SetWriteStencil(true, stencilValue);
|
||||
args.SetClipPlane(clipPlane);
|
||||
if ((thing->renderflags & RF_ZDOOMTRANS) && UseVanillaTransparency())
|
||||
if ((thing->renderflags & RF_ZDOOMTRANS) && r_UseVanillaTransparency)
|
||||
args.SetStyle(LegacyRenderStyles[STYLE_Normal], 1.0f, thing->fillcolor, thing->Translation, tex, fullbrightSprite);
|
||||
else
|
||||
args.SetStyle(thing->RenderStyle, thing->Alpha, thing->fillcolor, thing->Translation, tex, fullbrightSprite);
|
||||
|
|
|
@ -32,7 +32,8 @@
|
|||
#include "c_dispatch.h"
|
||||
#endif
|
||||
|
||||
CVAR (Int, r_vanillatrans, 2, CVAR_ARCHIVE)
|
||||
bool r_UseVanillaTransparency;
|
||||
CVAR (Int, r_vanillatrans, 0, CVAR_ARCHIVE)
|
||||
|
||||
namespace
|
||||
{
|
||||
|
|
|
@ -23,3 +23,4 @@
|
|||
|
||||
void UpdateVanillaTransparency();
|
||||
bool UseVanillaTransparency();
|
||||
extern bool r_UseVanillaTransparency;
|
||||
|
|
|
@ -69,7 +69,6 @@
|
|||
|
||||
EXTERN_CVAR(Bool, r_fullbrightignoresectorcolor)
|
||||
EXTERN_CVAR(Bool, gl_light_sprites)
|
||||
EXTERN_CVAR (Bool, r_vanillatrans)
|
||||
|
||||
namespace swrenderer
|
||||
{
|
||||
|
@ -214,7 +213,7 @@ namespace swrenderer
|
|||
if (thing->flags5 & MF5_BRIGHT)
|
||||
vis->renderflags |= RF_FULLBRIGHT; // kg3D
|
||||
vis->RenderStyle = thing->RenderStyle;
|
||||
if (UseVanillaTransparency())
|
||||
if (r_UseVanillaTransparency)
|
||||
{
|
||||
if (thing->renderflags & RF_ZDOOMTRANS)
|
||||
vis->RenderStyle = LegacyRenderStyles[STYLE_Normal];
|
||||
|
|
Loading…
Reference in a new issue