My graphic driver version:
Adrenalin 23.12.1
iirc this is an old issue since 2022. and this issue not only affects RDNA/RDNA2 card but also affects GCN cards like RX580.
On my Radeon RX6800 :
The debug view of DepthTexture shows that there is nothing wrong with the depth data. (by setting "r_shadow_debug 1" on console)
While on my NVIDIA 4060M and Intel UHD 770 , the shadow mapping works fine:
(The highlight texts on console give information about the rendering devices. as you can see both integrated and dedicated GPU work fine)
Minimum repro-able case:
https://github.com/hzqst/MetaHookSv
(Unfortunately I failed to repro this issue with a single file demo)
Related code :
Sampler definition
Samping
Texture binding
Step to repro:
It requires Steam and a free game called "Sven Co-op" to run.
1. Install Steam
2. Install a free game called "Sven Co-op" from Steam store
4. Unarchive the "MetaHookSv-windows-x86.zip"
5. Run "scripts/install-to-SvenCoop.bat", then close the notepad poped up
6. Launch game from the generated shortcut link "MetaHook for SvenCoop"
7. "Start New Game" -> Map -> -sp_campaign_portal -> Start
8. Press "F" to turn the flashlight on and see if the shadow being casted correctly