DOOM: BFA (Big Freaking Anniversary) Edition (former Classic RBDoom 3 BFG) is a source port based on RBDOOM-3-BFG and enchance the experience of Ultimate DOOM, DOOM 2 and DOOM 3.
GNU General Public License v3.0
211
stars
22
forks
source link
Disable twosided key for player head to enable shadow volume cast #137
Describe the Bug:
The main Doom 3 campaign has a problem when g_showplayershadow is on: the player's head does not cast a shadow. This issue is present in vanilla Doom 3 BFG as well. This can be fixed by changing materials/characters.mtr and commenting out the shader keyword twosided on line 2483:
According to posts online, twosided apparently not only draws a texture on both sides of the mesh, but also disables it's shadow volume cast, leading to the issue we see with the head. Other meshes use this keyword for hair and glasses, but no other part of the player body does. The Resurrection of Evil and Lost Episode player models do not exhibit this issue either.
Screenshots:
Screenshot 1 - Default rendering of player using twosided shader key on head, resulting in headless shadow.
Screenshot 2 - Fixed rendering of player by removing twosided shader key from head, resulting in normal shadow.
I just re-run the merge action after I updated the repo with the asset files. Sadly vcpkg decided to re-compile ffmpeg so in an hour from now the new prebuilds should be ready
Describe the Bug: The main Doom 3 campaign has a problem when
g_showplayershadow
is on: the player's head does not cast a shadow. This issue is present in vanilla Doom 3 BFG as well. This can be fixed by changingmaterials/characters.mtr
and commenting out the shader keywordtwosided
on line 2483:According to posts online,
twosided
apparently not only draws a texture on both sides of the mesh, but also disables it's shadow volume cast, leading to the issue we see with the head. Other meshes use this keyword for hair and glasses, but no other part of the player body does. The Resurrection of Evil and Lost Episode player models do not exhibit this issue either.Screenshots:
Screenshot 1 - Default rendering of player using
twosided
shader key on head, resulting in headless shadow. Screenshot 2 - Fixed rendering of player by removing
twosided
shader key from head, resulting in normal shadow. Desktop: