• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Emulator Discussion and Support › Development Discussion v
« Previous 1 ... 39 40 41 42 43 ... 117 Next »

[UNOFFICIAL] Bug Bounty: zfreeze
View New Posts | View Today's Posts

Pages (5): « Previous 1 2 3 4 5 Next »
Thread Closed 
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
[UNOFFICIAL] Bug Bounty: zfreeze
11-22-2014, 08:26 PM
#31
slarlac249 Offline
Senior Member
****
Posts: 496
Threads: 5
Joined: Jul 2013
https://code.google.com/p/dolphin-emu/issues/detail?id=4113

plenty of ideas there, yet no one took up the challenge.

Quote:If you want a useful idea, implement zfreeze in the hw renderers, that'll pretty much fix the issue Wink
We already have support for that in the software backend, so if you really wanted to mess with it you could take a look at how its done there. It'll be quite a bit involving for the hw renderers though, since we'll need to software transform all vertices (we already have code which does that) and compute the zslope from that.


pretty much goes over my head what they are talking about.
Find
11-23-2014, 10:02 PM
#32
slarlac249 Offline
Senior Member
****
Posts: 496
Threads: 5
Joined: Jul 2013
managed to find the last zfreeze release;

https://us.dolphin-emu.org/download/list/zfreeze/1/?cr=us

3.5-1729
Find
11-26-2014, 12:58 AM
#33
degasus Offline
Developer
**********
Developers (Some Administrators and Super Moderators)
Posts: 1,828
Threads: 10
Joined: May 2012
(11-13-2014, 04:23 AM)Fiora Wrote: I think the most helpful thing would be an actual solid, fleshed-out idea for how to approach the problem -- right now it feels like it's languishing because nobody really knows quite how to do it. Even if it's just a write-up of how one might reliably and efficiently emulate zfreeze, a solid idea would probably do more to inspire people to try it than any amount of money.
I like this way to handle this issue, so let's talk about my proposel to implement this feature.

I strongly dislike the first proposel of transforming within the vertex loader because of some issues:
- cpu performance (ok, it's fine to laugh when you'll read my one...)
- software transformation dependency within videocommon (bbox support already patched out for ogl4 GPUs)
- the main issue: How shall this fix zfighting? We need a deterministic way to always get the exact same value for every pixel. Rasterization is only deterministic if all three positions are identical (order independet).

My suggestion is splitted into two parts. The interface is based on the linear z plane parameters vec3 my_depth_parameters.
Calculating the depth is deterministic possible by: gl_FragDepth = dot(vec3(gl_FragCoord.xy, 1.0), my_depth_parameters);
Generating this parameters can be easyly done in the geometry shader per primitive.
-> This require slow depth, so it will conflict with zcomploc.

This was the easier part. The harder part is to readback the *last* used z parameters. Here I'm still a bit indecisive how to do it. It is possible, but I have no clue about the fastest way Big Grin
Possible ways would be to use:
- SSBO, but it will be hacky to only get the last one
- transform feedback (just record all primitives and read the last parameters again)
Find
11-26-2014, 01:28 AM
#34
Tino Offline
Above and Beyond
*******
Posts: 2,276
Threads: 1
Joined: Oct 2013
The fastest way I think, will be as long as the zfreeze is not active record the last flushed primitive and it corresponding transformation matrix ( using the global mtx index or the pervertex idx ). the when zfreeze is switched on, calculate plane coeficients and send them to the gpu.
Find
11-26-2014, 01:39 AM
#35
degasus Offline
Developer
**********
Developers (Some Administrators and Super Moderators)
Posts: 1,828
Threads: 10
Joined: May 2012
Tino: But this coeficients must be the same as the gpu did use internally. Else we'll end in z fighting again :/
Find
11-26-2014, 02:06 AM
#36
Tino Offline
Above and Beyond
*******
Posts: 2,276
Threads: 1
Joined: Oct 2013
yes that the hard part, because that can change in diferent implementations, the best we can spect is to get a consistent value for all the primitives generated using our implemnetation of zfreeze, and eliminate z figting introducing a small offset to compensate. the best way will be to do a hardware test to determine the correct formula from the native hard, and then tweak our paremeters to compensate side effects from diferent hardware implementations.
Find
11-26-2014, 02:34 AM
#37
Fiora Offline
x86 JIT Princess
**********
Developers (Some Administrators and Super Moderators)
Posts: 237
Threads: 0
Joined: Aug 2014
Do any games where zfreeze is very important also use zcomploc in an important/necessary way? i.e. does zcomploc breaking cause serious issues there?
Website Find
11-26-2014, 03:09 AM
#38
Tino Offline
Above and Beyond
*******
Posts: 2,276
Threads: 1
Joined: Oct 2013
I did not have any of the games that show glitches from zfreeze so i cannot tell Sad
Find
11-26-2014, 03:54 AM
#39
neobrain Offline
"Wow, I made my code 1000x faster! That means I can make it 2048x slower now!"
**********
Developers (Some Administrators and Super Moderators)
Posts: 3,208
Threads: 50
Joined: Jun 2009
I just wrote this overview to get some more focused efforts going: https://forums.dolphin-emu.org/Thread-implementing-zfreeze-the-program

If everyone agrees, I'd like to move discussion over there and close this thread.
My blog
Me on Twitter
My wishlist on Amazon.de
Find
11-26-2014, 07:19 AM
#40
BlizzardToaBreeze Offline
Member
***
Posts: 53
Threads: 8
Joined: Nov 2012
Fine by me
OS: Windows 8 Pro x64
CPU: Intel i5-4670K @ 4.2
GPU: Nvidia GTX 970

Find
« Next Oldest | Next Newest »
Pages (5): « Previous 1 2 3 4 5 Next »
Thread Closed 


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode