-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
D3D: Depth range inversion. #2448
Conversation
Oh yes this one was huge. Fix a lot of z fighting ( or technically, get the
same as real wii ). fix also zelda ss past/present composition effect :)
|
@galop1n SlowDepth became console accurate after we changed the depth divisor to a power-of-two. Now your technique gets rid of the last floating point rounding error to make FastDepth console accurate, good job. Do you want me to change the author of the commit, since it's based on your code? |
Hehe thanks, i always hate the "fast depth" option as there was no reason I have some good plans for when coming back to dolphin, like a dx12
|
@galop1n I had a look at DirectX12 this morning, it should lower the overhead a bit since state tracking will become our responsibility (we already do so). But isn't the real advantage in having multiple threads assemble command lists and adding those to the command queue? It'll be difficult to take advantage of that in Dolphin. |
The ability ( and duty ) of fencing ourself memory usage should help a bit
|
Ah, I didn't take a look at the memory management yet, that looks very relevant indeed. |
@galop1n Btw, you probably wrote your code before we were preparing to change the license. All new contributions are done under the GPLv2+ license, meaning your code is automatically also licensed under GPLv3. Are you okay with that? |
de7652d
to
e36be98
Compare
He already gave permission for this to be put into Dolphin I thought? This was in his old PR, and he responded positively in the licensing sheet. |
Can't believe it's almost been a year since galop1n implemented it. yeah this would be really nice. Fast depth is a nice perform boost. |
|
||
WRITE(p, " depth = clamp(depth * 16777216.0, 0.0, float(0xFFFFFF));\n"); | ||
WRITE(p, " depth *= 16777216.0;\n"); |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
@@ -150,12 +150,12 @@ const char depth_matrix_program[] = { | |||
|
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Credits go to Galop1n for designing this technique and to BhaaLseN for cleaning up the commit.
LGTM |
FifoCI detected that this change impacts graphical rendering. Here are the behavior differences detected by the system:
automated-fifoci-reporter |
Credits go to @galop1n for designing this technique and to @BhaaLseN for cleaning up the commit.
This makes FastDepth accurate for D3D together with PR #2419 for OGL. After both PRs have been merged we can remove FastDepth as an option (forcing it on) and concentrate on fixing bugs with accurate depth buffers.
If you're interested in how this equation works you can read the derivation in section 5 of the depth equations.