Skip to content

Commit

Permalink
Cast lighter shadows for translucent things
Browse files Browse the repository at this point in the history
  • Loading branch information
bradharding committed Oct 14, 2021
1 parent f064473 commit 723052c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
1 change: 1 addition & 0 deletions releasenotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
* Dithered lighting is now cast on *BOOM*-compatible translucent wall textures.
* Things on scrolling floors will no longer continue to move while the menu is open.
* When the player drops down from a great height, their weapon will no longer move too far downwards when the `weaponbounce` CVAR is `on`.
* Translucent things now cast more translucent shadows.

![](https://github.com/bradharding/www.doomretro.com/raw/master/wiki/bigdivider.png)

Expand Down
2 changes: 1 addition & 1 deletion src/info.c
Original file line number Diff line number Diff line change
Expand Up @@ -2649,7 +2649,7 @@ mobjinfo_t mobjinfo[] =
/* damage */ 0,
/* activesound */ sfx_none,
/* flags */ (MF_SPECIAL | MF_COUNTITEM),
/* flags2 */ (MF2_CASTSHADOW | MF2_TRANSLUCENT_BLUE_25 | MF2_FLOATBOB),
/* flags2 */ (MF2_CASTSHADOW | MF2_TRANSLUCENT_33 | MF2_FLOATBOB),
/* flags3 */ 0,
/* raisestate */ S_NULL,
/* frames */ 4,
Expand Down
14 changes: 12 additions & 2 deletions src/r_things.c
Original file line number Diff line number Diff line change
Expand Up @@ -499,8 +499,18 @@ static void R_DrawVisSpriteWithShadow(const vissprite_t *vis)
dc_colormap[0] = vis->colormap;
dc_nextcolormap[0] = vis->nextcolormap;
dc_black = dc_colormap[0][nearestblack];
dc_black33 = &tinttab33[dc_black << 8];
dc_black40 = &tinttab40[dc_black << 8];

if ((mobj->flags2 & MF2_TRANSLUCENT_33) && r_translucency)
{
dc_black33 = &tinttab10[dc_black << 8];
dc_black40 = &tinttab25[dc_black << 8];
}
else
{
dc_black33 = &tinttab33[dc_black << 8];
dc_black40 = &tinttab40[dc_black << 8];
}

dc_iscale = FixedDiv(FRACUNIT, spryscale);
dc_texturemid = vis->texturemid;

Expand Down

0 comments on commit 723052c

Please sign in to comment.