cancel
Showing results for 
Search instead for 
Did you mean: 

OpenGL & Vulkan

hzqst008
Adept I

sampler2DShadow-based shadow mapping doesn't work

 

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

 

On my Radeon RX6800 :

 

 

005.png

 

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

 

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 161916.png

 

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
 
3. Download latest release from Releases · hzqst/MetaHookSv (github.com)
 
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
 
(Or you can just follow the installation guide)
 
 

10. If you want to dig more into the source code, you can follow the instruction --- https://github.com/hzqst/MetaHookSv#build-instruction and https://github.com/hzqst/MetaHookSv#debugging

Then launch game with Renderer.dll compiled in Debug mode

007.png

0 Likes
2 Replies
hzqst008
Adept I

Any progress on this issue?

0 Likes
hzqst008
Adept I

hi, any progress ?

0 Likes