alelievr / HDRP-Custom-Passes

A bunch of custom passes made for HDRP
MIT License
1.25k stars 136 forks source link

FPS Foreground dependent on camera clipping planes #54

Closed jkubala closed 7 months ago

jkubala commented 7 months ago

Hello, I seem to have spotted a bug / limitation in the FPS Foreground rendering. The object goes transparent when the near clipping plane is set to 0.01. If near distance is increased (to 0.3), it renders the object properly, but of course then it clips through the camera when aiming down sights. I tried to fiddle with the parameters in the script a bit - unsuccessfuly, because I have no experience in this area, so I am completely clueless. May I ask you for some advice on this issue? Thanks for reading!

jkubala commented 7 months ago

I solved it by changing the depth variable in ForegroundDepthClear script to 0.01. I am quite worried if I did not break something with that (as I said, I am completely clueless in this area), so any feedback on this would be much appreciated. Thanks a ton for this repo, truly a lifesaver in the Wild West of HDRP :)

alelievr commented 7 months ago

Hey, I think that's fine to do this modification since there are already some problems with screen-space effects, it shouldn't add too many problems. I guess something to watch out for is SSR, be sure to disable it on the materials of your FPS objects and it should be good.