diff --git a/src/rendering/hwrenderer/scene/hw_drawlist.cpp b/src/rendering/hwrenderer/scene/hw_drawlist.cpp index b31431d8de..26f64f04d3 100644 --- a/src/rendering/hwrenderer/scene/hw_drawlist.cpp +++ b/src/rendering/hwrenderer/scene/hw_drawlist.cpp @@ -480,6 +480,7 @@ void HWDrawList::SortWallIntoWall(HWDrawInfo *di, SortNode * head,SortNode * sor //========================================================================== EXTERN_CVAR(Int, gl_billboard_mode) EXTERN_CVAR(Bool, gl_billboard_faces_camera) +EXTERN_CVAR(Bool, hw_force_cambbpref) EXTERN_CVAR(Bool, gl_billboard_particles) inline double CalcIntersectionVertex(HWSprite *s, HWWall * w2) @@ -523,7 +524,8 @@ void HWDrawList::SortSpriteIntoWall(HWDrawInfo *di, SortNode * head,SortNode * s const bool drawWithXYBillboard = ((ss->particle && gl_billboard_particles) || (!(ss->actor && ss->actor->renderflags & RF_FORCEYBILLBOARD) && (gl_billboard_mode == 1 || (ss->actor && ss->actor->renderflags & RF_FORCEXYBILLBOARD)))); - const bool drawBillboardFacingCamera = (gl_billboard_faces_camera && (ss->actor && !(ss->actor->renderflags2 & RF2_BILLBOARDNOFACECAMERA))) + const bool drawBillboardFacingCamera = hw_force_cambbpref ? gl_billboard_faces_camera : + (gl_billboard_faces_camera && (ss->actor && !(ss->actor->renderflags2 & RF2_BILLBOARDNOFACECAMERA))) || (ss->actor && ss->actor->renderflags2 & RF2_BILLBOARDFACECAMERA); // [Nash] has +ROLLSPRITE diff --git a/src/rendering/hwrenderer/scene/hw_sprites.cpp b/src/rendering/hwrenderer/scene/hw_sprites.cpp index bffccf404e..5be9a03350 100644 --- a/src/rendering/hwrenderer/scene/hw_sprites.cpp +++ b/src/rendering/hwrenderer/scene/hw_sprites.cpp @@ -85,6 +85,7 @@ CVAR(Float, gl_sclipfactor, 1.8f, CVAR_ARCHIVE) CVAR(Int, gl_particles_style, 2, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) // 0 = square, 1 = round, 2 = smooth CVAR(Int, gl_billboard_mode, 0, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) CVAR(Bool, gl_billboard_faces_camera, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) +CVAR(Bool, hw_force_cambbpref, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) CVAR(Bool, gl_billboard_particles, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) CUSTOM_CVAR(Int, gl_fuzztype, 0, CVAR_ARCHIVE) { @@ -386,7 +387,8 @@ bool HWSprite::CalculateVertices(HWDrawInfo *di, FVector3 *v, DVector3 *vp) //&& di->mViewActor != nullptr && (gl_billboard_mode == 1 || (actor && actor->renderflags & RF_FORCEXYBILLBOARD)))); - const bool drawBillboardFacingCamera = (gl_billboard_faces_camera && (actor && !(actor->renderflags2 & RF2_BILLBOARDNOFACECAMERA))) + const bool drawBillboardFacingCamera = hw_force_cambbpref ? gl_billboard_faces_camera : + (gl_billboard_faces_camera && (actor && !(actor->renderflags2 & RF2_BILLBOARDNOFACECAMERA))) || !!(actor && actor->renderflags2 & RF2_BILLBOARDFACECAMERA); // [Nash] has +ROLLSPRITE @@ -1139,8 +1141,9 @@ void HWSprite::Process(HWDrawInfo *di, AActor* thing, sector_t * sector, area_t if (!gl_sprite_blend || modelframe || (thing->renderflags & (RF_FLATSPRITE | RF_WALLSPRITE)) || + (hw_force_cambbpref ? gl_billboard_faces_camera : (gl_billboard_faces_camera && !(thing->renderflags2 & RF2_BILLBOARDNOFACECAMERA)) || - thing->renderflags2 & RF2_BILLBOARDFACECAMERA) + thing->renderflags2 & RF2_BILLBOARDFACECAMERA)) { RenderStyle.SrcAlpha = STYLEALPHA_One; RenderStyle.DestAlpha = STYLEALPHA_Zero; diff --git a/wadsrc/static/menudef.txt b/wadsrc/static/menudef.txt index 9166e3a7a7..0f384a4270 100644 --- a/wadsrc/static/menudef.txt +++ b/wadsrc/static/menudef.txt @@ -2630,6 +2630,7 @@ OptionMenu "OpenGLOptions" protected Option "$GLPREFMNU_FUZZSTYLE", gl_fuzztype, "FuzzStyle" Option "$GLPREFMNU_SPRBILLBOARD", gl_billboard_mode, "BillboardModes" Option "$GLPREFMNU_SPRBILLFACECAMERA", gl_billboard_faces_camera, "OnOff" + Option "$GLPREFMNU_SPRBILLFACECAMERAFORCE", hw_force_cambbpref, "OnOff" Option "$GLPREFMNU_PARTICLESTYLE", gl_particles_style, "Particles" Option "$GLPREFMNU_RENDERQUALITY", gl_seamless, "Precision" //Option "$GLPREFMNU_CORONAS", gl_coronas, "OnOff"