-
-
Notifications
You must be signed in to change notification settings - Fork 345
nv2a: add new NV_PGRAPH parameters, fix W_param tests, ZMinMaxControl tests, see through and missing shadows #1895
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
base: master
Are you sure you want to change the base?
nv2a: add new NV_PGRAPH parameters, fix W_param tests, ZMinMaxControl tests, see through and missing shadows #1895
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.
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
This reverts commit 4da74db.
- Regression of some fixed missing shadows from xemu-project#577, identified the source of the problem
Restores shadows for many games in xemu-project#577 w/o removing the Xbox dashboard background
Do not specify cull mode if NV_PGRAPH_SETUPRASTER_CULLENABLE = false
Partially fixes fixed function, w-buffer, z cull tests
- Discard fragments from shader - Implemented zbias when w-buffering - Clipping volume change to [-1 , 1] for OGL moved to frag shader to avoid floating point precission loss
- Added parameter NV097_SET_ZMIN_MAX_CONTROL_CULL_NEAR_FAR_EN_TRUE
- 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
- Fixed texture perspective issue in fixed function
You really scared me. I thought such a good PR was closed because there was no response for a long time... |
- This fixes OGL not refreshing display properly when running some tests
Like your PR #1896, this PR appears to contain unsubmitted work in progress from @coldhex's development branch... As I commented on #1896, the unattributed work of others mixed with your original work cannot be accepted into the project. For this reason, I'll move this PR into draft state for now. |
It's not like that in this case. In fact, I submitted this before the branch you're citing was submitted. I did use some of his work as I said back in #1707, but that branch was quite different since it wasn't implemented for Vulkan yet, which I did. That and the implementation of the texture_perspective variable (which I needed to avoid texture warping) are the only things I used from his branch. Any other resemblance is coincidental. |
I have reuploaded this PR because renaming my fork's branch automatically closed the other one.
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 (most likely unrelated). Near/far custom clipping planes are incorrect; they're hardcoded to test behavior and to approach HW results.
OGL shows erratic behavior when running fixed function tests specifically, as shown here(fixed in the latest commit)I'm leaving it here. "NEARFAR" feature is implemented but not fixed, left some comments in the code. I'll fix it in another PR if I find a solution, or let someone else beat me to it