-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FPS Foreground clipping issues #58
Comments
Hello, Can you try the V2 of the FPS effect I just pushed on master? fa6fd3c The old version caused a bunch of issues with screen-space effects like AO, DoF, etc as well as some weird things happening with motion-based effects (motion blur, TAA reprojection, etc.) and this new version tries to fix most of these issues. I can see why the first version had issues with depth, I needed to use a low value near the camera to avoid breaking several effects but it affects the rendering of the foreground layer itself and it's also probably causing the issue you're seeing. I'm talking specifically about this value: https://github.com/alelievr/HDRP-Custom-Passes/blob/master/Assets/CustomPasses/FPS%20Foreground/ForegroundDepthClear.shader#L58 The V2 will not have clipping issues because it doesn't touch the depth buffer of the frame before opaque objects are rendered. Instead, I'm using additional buffers to render the color of the foreground layer and then I composite the color just before post processing. The compositing overwrites the camera color, depth, and motion vectors as well as a stencil bit used to disable the temporal reprojection of TAA and TAAU that could cause ghosting because the motion vectors are wrong.
|
@alelievr Hey, thanks so much for working on this. I played around with V2 a bit, and it is definitely an improvement. I can confirm that the near-clip issue is resolved, and the only sorta bummer is that transparency doesn't work in the foreground (however I think I can go without that for my game). |
@alelievr would it be possible to make it work with dynamic resolution and dlss/fsr? |
I need the near-clip of the camera to be low enough to prevent clipping when the weapon is very close to the screen (i.e. when recoil pushes the weapon back). I'm using a value of 0.03 which seems reasonable, but the custom pass seems to break and render only the a small section of the weapon, closest to the camera, as if it is being affected by a far-clip, but it's not.
I attempted to edit the custom pass to use different near and far clip values for the FPSForegroundCamera that's made at runtime, but no matter how I tweak the values, there's some kind of clipping error.
I don't know much about custom passes and I really don't know what could be causing this issue. Perhaps it can be solved with a certain configuration, but after an hour and a half of trying to figure it out myself, I decided to make this issue.
Thanks.
The text was updated successfully, but these errors were encountered: