-
-
Notifications
You must be signed in to change notification settings - Fork 310
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
nv2a: add new NV_PGRAPH parameters, fix W_param tests, ZMinMaxControl tests, see through and missing shadows #1826
Conversation
Passing clipRange variable as a uniform and performing perspective divide in fragment shader for z_perspective = true solves the see through issue that affects many games. Shader code for z_perspective = false is virtually unaltered.
Hi again. I think this is the 4th PR now opened for this. As much as I'd like to see Halo 2 and other games fixed, I still have yet to see the test cases that I've asked for that demonstrate this actually matches hardware behavior. Will you please create the test cases? |
Hi. Yes sure, I'm having a look at the nxdk but I need some guidance. How could I build a scene that replicates this unwanted see through effect? could someone give me some specs? With perspective enabled, I'd put two or more 3D objects in a way that one occludes the other(s), but I assume they'd have to be in a specific position and orientation. Also, I wanted to test the titles in #1016 that are known to suffer from this @Triticum0 And finally, the latest release of nxdk_pgraph_tests has no .xiso image attached, and there's a ZMinMaxControl test that might be helpful for this PR that is not included in the previous release @abaire |
Dunno if i've mentioned in previous issues but just in case, the pr does fix clipping but breaks shadows and lights in splinter cell. |
Thanks for the heads up, the workflow should be fixed now and the latest release has an iso artifact. |
How so? I haven't tried any Splinter Cell yet. Anyway, this pr is slightly different bc the code was reorganized when Vulkan was implemented. Try it if you like :) |
some send my an app image forgot how to build from source. |
there is like shadow/light clipping and you can see them behave like a vertex explosion. There might be still a depth conflict. |
yeah think I got same issue on splinter cell as well thought comparing both images to xbox might be unrelated as seem dynamic light no even rendered on master build. Reference: https://www.youtube.com/watch?v=tA26hB0vbGk |
Now that you mention it, this PR may also fix many of the missing shadows in #577, I could test it on Wallace & Gromit, Conker and Halo CE. It also fixes some clipping issues in Halo 2 cutscenes. |
Done some more testing seems to have fixed most of the z-ordering issues. in most of game I tested. 007: Nightfire Battlefield 2: Modern Combat Breakdown Marvel Nemesis: Rise of the Imperfects Midtown Madness 3 Fixeds the shadows as well Project Gotham Racing Shadows are broken Games unaffected Games Untested. will not test any more game on-till a test case has been written. |
Edit: this one is trickier than expected, probably unrelated. It changes on different scales |
Fixes robots, bionic ingame clipping and ice age 2 |
Partially fixes Halo 2 master: 956ef0b |
They are still there, but unused
- z_perspective refactor to PixelShader and texture_perspective var added - vtx_inv_w and vtx_inv_w_flat vars totally removed - Fixes warping of textures from previous commit w/o breaking tests - Also fixes dashboard menu background regression
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commit did NOT fix dashboard menu regression:
@mborgerson @Triticum0 @Fabxx I'm conducting more tests, but here are some:
w_gaps:
https://github.com/abaire/nxdk_pgraph_tests_golden_results/blob/main/W_param/w_gaps.png
v0.8.8
PR
w_neg_strip:
https://github.com/abaire/nxdk_pgraph_tests_golden_results/blob/main/W_param/w_neg_strip.png
v0.8.8
PR
VK
OGL
w_pos_strip:
https://github.com/abaire/nxdk_pgraph_tests_golden_results/blob/main/W_param/w_pos_strip.png
v0.8.8
PR
ogl.mp4Notice how the same test works differently depending on the previous test I ran. This only happens in fixed function tests. Other than that, everything works the same in OGL and Vulkan. |
Don't suppose you'd be willing to drop another release build like previously? |
Sure |
- Added parameter NV097_SET_ZMIN_MAX_CONTROL_CULL_NEAR_FAR_EN_TRUE
Thanks for your feedback, but you should check how it runs on OG HW first. The first three captures appear to match HW behavior. |
So whats the status up here if i might ask. |
Sorry, I'll convert the PR to draft until I'm finished to avoid confusion. I noticed that some colors in the ZMinMaxControl tests were off, so I'm still making significant progress, although the end result will not be 100% HW accurate. My next push will most likely be the last one, probably by the end of the day or of this week. I'll give you a heads up and reopen the PR for merge. |
- Added depth buffer variable to shaders to store w coordinate
- They are there just to test behavior and most likely incorrect, but close enough to HW. It's a good starting point for future work
@svensvond @mborgerson PR is ready for merge |
I tested this PR upon master. These are the results with splinter cell |
- Fixed texture perspective issue in fixed function
Fixed ;) |
re-testing now, do you have discord btw? Might be faster to send test results there to you. Update: |
sha.webm@polymetal0 i still notice some shadow flickering |
Happy new year everyone!
I was holding this PR until Vulkan rendering was ready. So here it is, for both Vulkan and OpenGL.
RECAP
Fixes/shows progress (captures taken in Vulkan, 2x)



W_param tests
https://github.com/abaire/nxdk_pgraph_tests_golden_results/tree/main/W_param
PR
w_gaps
w_neg_strip
w_pos_strip (fixed)
ZMinMaxControl tests
































https://github.com/abaire/nxdk_pgraph_tests_golden_results/tree/main/ZMinMaxControl
PR
Comments: clipping planes match HW behavior at 1x but are a bit off at higher scales. Near/far custom clipping planes do not entirely match HW behavior. OGL shows erratic behavior when running fixed function tests specifically, as shown here #1826 (comment)