mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-03-21 18:31:10 +00:00
- add option to override renderflags +BILLBOARD[NO]FACECAMERA
This commit is contained in:
parent
b4d5c7d669
commit
102c467de5
3 changed files with 9 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue