• 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 ... 8 9 10 11 12 ... 117 Next »

multiview rendering 45 views?
View New Posts | View Today's Posts

Pages (2): 1 2 Next »
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
multiview rendering 45 views?
05-18-2020, 02:20 PM
#1
blas_t_dozer Offline
Junior Member
**
Posts: 7
Threads: 1
Joined: May 2020
I'd like to put Dolphin into one of these holographic devices:

[Image: UEcpsMj.jpg?4]

It would mean I would have to extend Dolphin's stereo mode to more than 2 eyes--for these devices potentially up to 45 views, in a horizontal rail.

I was looking through the code at places where StereoMode is used, like:

Code:
static u32 CalculateEFBLayers()
{
 return (g_ActiveConfig.stereo_mode != StereoMode::Off) ? 2 : 1;
}
It seems, given the way the camera can already be moved with the stereo hack, that what I'm after would be possible! My questions for the devs:

  1. Would performance be reasonable? With the way the geometry shader duplexes out the stereo views, can we guess about how rendering 45 views of a single GameCube frame on a beefy graphics card would do?
  2. Is it possible to modify the projection matrix of the camera before rendering?
Any thoughts at all are welcome before I go down the road of building Dolphin, etc. Thanks!
Find
Reply
05-19-2020, 02:27 PM (This post was last modified: 05-19-2020, 02:46 PM by iwubcode.)
#2
iwubcode Offline
Member
***
Posts: 230
Threads: 2
Joined: Oct 2019
I hadn't heard of this but I always loved stereoscopic 3d. This is really cool. Do you own one of these? I'd love to hear general impressions if you do. It seems like 3ds type technology but with more pop?

I was very excited but saw the cost. Much like the hololens, it's likely not consumer ready yet. Still neat tech.

(05-18-2020, 02:20 PM)blas_t_dozer Wrote: Would performance be reasonable? With the way the geometry shader duplexes out the stereo views, can we guess about how rendering 45 views of a single GameCube frame on a beefy graphics card would do?

This would be my main concern. I can't speak to this exactly but can say that 3d takes a hit obviously when rendering 2 views, I can't imagine 45!

You can read about the theory here: https://dolphin-emu.org/blog/2015/05/13/a-second-perspective/ . I believe the geometry shader is actually used to do the actual rendering of the two views at the moment. Unfortunately, I haven't really looked into how that works in detail, so I can't can't give you any more specific information.

(05-18-2020, 02:20 PM)blas_t_dozer Wrote: Is it possible to modify the projection matrix of the camera before rendering?

Yes, that's what the freelook camera does but that might be more work for your use case than using the geometry shader.

--

If you do manage to get something working. Please post about it!
Find
Reply
05-23-2020, 03:07 AM
#3
blas_t_dozer Offline
Junior Member
**
Posts: 7
Threads: 1
Joined: May 2020
Yeah! It's 45 views instead of 2 so it definitely has way more of a feel of realism than a DS screen. Not to mention they are bigger and brighter.

I'll keep you posted!
Find
Reply
05-26-2020, 10:53 AM
#4
iwubcode Offline
Member
***
Posts: 230
Threads: 2
Joined: Oct 2019
Slightly different use case but you can see the changes I made for something similar (rendering 2 views in a split-screen style): https://github.com/dolphin-emu/dolphin/pull/8832
Find
Reply
05-27-2020, 02:24 AM
#5
blas_t_dozer Offline
Junior Member
**
Posts: 7
Threads: 1
Joined: May 2020
An update: Dolphin builds on my Windows machine fine, but then always crashes with a mysterious stack--it must be the JIT compiler, because when I enable the cached interpreter, things run, but way too slowly to be usable. Unfortunately I don't have time to track down JIT crashes right now, so I'll have to come back to this project when Dolphin master is building and running successfully!
Find
Reply
05-27-2020, 02:48 AM
#6
JosJuice Offline
Developer
**********
Developers (Some Administrators and Super Moderators)
Posts: 8,946
Threads: 7
Joined: Oct 2014
(05-27-2020, 02:24 AM)blas_t_dozer Wrote: An update: Dolphin builds on my Windows machine fine, but then always crashes with a mysterious stack--it must be the JIT compiler, because when I enable the cached interpreter, things run, but way too slowly to be usable. Unfortunately I don't have time to track down JIT crashes right now, so I'll have to come back to this project when Dolphin master is building and running successfully!

It's not actually a crash. Just tell Visual Studio to ignore it and it'll work.
Find
Reply
05-27-2020, 03:24 AM
#7
blas_t_dozer Offline
Junior Member
**
Posts: 7
Threads: 1
Joined: May 2020
(05-27-2020, 02:48 AM)JosJuice Wrote: It's not actually a crash. Just tell Visual Studio to ignore it and it'll work.

Big Grin doh. thanks!
Find
Reply
05-27-2020, 05:28 AM
#8
blas_t_dozer Offline
Junior Member
**
Posts: 7
Threads: 1
Joined: May 2020
You can follow my fork on github - today I refactored the framebuffer manager so it understands that there may be N views, instead of 1 or 2, and got most of the way there in the shader generator as well.

I also added some fancy new holographic-display-related options to the "Enhancements" tab in Graphics Settings:

[Image: q0gEyAl.png]

Unfortuantely I still haven't figured out why, but I'm still only getting 2 views max, even when I try to render 16 in a row, like here: 

[Image: CO2Qy5f.png]

There may be more assumptions in the geometry shader that I'm missing...I'll keep this thread posted!
Find
Reply
05-29-2020, 03:35 AM
#9
blas_t_dozer Offline
Junior Member
**
Posts: 7
Threads: 1
Joined: May 2020
An update: I did get Dolphin to render N views instead of 1 or 2 successfully.

Now all that's left is to build in support for a special shader that combines the multiple views into a special format used by the display.

(Am I right in thinking the rules of this forum prohibit me from posting images of running games?)
Find
Reply
05-29-2020, 04:43 AM
#10
JosJuice Offline
Developer
**********
Developers (Some Administrators and Super Moderators)
Posts: 8,946
Threads: 7
Joined: Oct 2014
(05-29-2020, 03:35 AM)blas_t_dozer Wrote: (Am I right in thinking the rules of this forum prohibit me from posting images of running games?)

No, that's fine.
Find
Reply
« Next Oldest | Next Newest »
Pages (2): 1 2 Next »


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


Users browsing this thread: 2 Guest(s)



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode