Skip to content

Commit

Permalink
render: allowed studiomodels rendering in envshot pass
Browse files Browse the repository at this point in the history
  • Loading branch information
SNMetamorph committed Aug 25, 2021
1 parent 1124466 commit c6ea5e0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion client/render/gl_frustum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,10 @@ bool CFrustum :: CullBox( const Vector &mins, const Vector &maxs, int userClipFl
{
int iClipFlags;

if( CVAR_TO_BOOL( r_nocull ))
if (CVAR_TO_BOOL(r_nocull))
return false;
else if (RP_CUBEPASS()) // disable culling when rendering envmap
return true;

if( userClipFlags != 0 )
iClipFlags = userClipFlags;
Expand Down
4 changes: 2 additions & 2 deletions client/render/gl_rmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -589,8 +589,8 @@ static void R_SetupViewCache( const ref_viewpass_t *rvp )
RI->view.parallelSplitDistances[NUM_SHADOW_SPLITS] = farClip;
}

// don't draw the entities while render skybox or cubemap
if (!FBitSet(RI->params, (RP_ENVVIEW | RP_SKYVIEW)))
// don't draw the entities while render skybox
if (!FBitSet(RI->params, (RP_SKYVIEW)))
{
// before process of tr.draw_entities
// we can add muzzleflashes here
Expand Down
2 changes: 1 addition & 1 deletion client/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ bool Mod_BoxVisible( const Vector mins, const Vector maxs, const byte *visbits )
mnode_t *headnode;
int i, count;

if( !visbits || !mins || !maxs )
if( !visbits || !mins || !maxs || RP_CUBEPASS())
return true;

count = Mod_BoxLeafnums( mins, maxs, leafList, ARRAYSIZE( leafList ), &headnode );
Expand Down

0 comments on commit c6ea5e0

Please sign in to comment.