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.
![004.png 004.png](/t5/image/serverpage/image-id/102143iF307A519E3FC9FF9/image-size/large?v=v2&px=999)
On my Radeon RX6800 :
![005.png 005.png](/t5/image/serverpage/image-id/102147iC6BAE40F64B05F85/image-size/large?v=v2&px=999)
The debug view of DepthTexture shows that there is nothing wrong with the depth data. (by setting "r_shadow_debug 1" on console)
![006.png 006.png](/t5/image/serverpage/image-id/102148i1265B6177B92A62D/image-size/large?v=v2&px=999)
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)
![屏幕截图 2024-01-14 161746.png 屏幕截图 2024-01-14 161746.png](/t5/image/serverpage/image-id/102149i3C0F3D7667EDDD9F/image-size/large?v=v2&px=999)
![屏幕截图 2024-01-14 161916.png 屏幕截图 2024-01-14 161916.png](/t5/image/serverpage/image-id/102150i507178668EF3D830/image-size/large?v=v2&px=999)
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