Skip to content

Commit

Permalink
[rend2] Don't draw shadowmap shadows for g2 effects
Browse files Browse the repository at this point in the history
  • Loading branch information
SomaZ committed Oct 11, 2023
1 parent e654948 commit 1ba765b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion shared/rd-rend2/tr_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2313,7 +2313,7 @@ void R_SetupPshadowMaps(trRefdef_t *refdef)
{
trRefEntity_t *ent = &refdef->entities[i];

if((ent->e.renderfx & (RF_FIRST_PERSON | RF_NOSHADOW)))
if((ent->e.renderfx & (RF_FIRST_PERSON | RF_NOSHADOW | RF_DEPTHHACK)))
continue;

//if((ent->e.renderfx & RF_THIRD_PERSON))
Expand Down Expand Up @@ -2343,6 +2343,13 @@ void R_SetupPshadowMaps(trRefdef_t *refdef)
{
if (ent->e.ghoul2 && G2API_HaveWeGhoul2Models(*((CGhoul2Info_v *)ent->e.ghoul2)))
{
shader_t *cust_shader = nullptr;
if (ent->e.customShader)
{
cust_shader = R_GetShaderByHandle(ent->e.customShader);
if (cust_shader->sort != SS_OPAQUE)
continue;
}
// scale the radius if needed
float largestScale = ent->e.modelScale[0];
if (ent->e.modelScale[1] > largestScale)
Expand Down

0 comments on commit 1ba765b

Please sign in to comment.