libretro / flycast

Flycast is a multiplatform Sega Dreamcast emulator. NOTE: No longer actively developed, use upstream repo for libretro from now on - https://github.com/flyinghead/flycast
http://reicast.com
GNU General Public License v2.0
155 stars 78 forks source link

curious about possibility of a software renderer? #882

Open klepp0906 opened 4 years ago

klepp0906 commented 4 years ago

So based on a massive bounty I see on the reicast github that someone is apparently working on, theyre going to have a software renderer relatively soon.

Id love if that were possible here, as not having one available makes capture among other things a bit of a hindrance.

i'm not sure how the fork from reicast happened or whatnot, but if something like that came to be "there" would it make its way over "here" or is flycast entirely separate/independent?

flyinghead commented 4 years ago

I haven't tested the reicast software renderer but as far as I know it's not finished yet, and there hasn't been any progress on it in the last two months. Missing features include bump mapping, many texture and framebuffer formats, mipmapping, trilinear filtering, two-volume mode, X and Y scalers, etc.

Furthermore, I doubt it will be usable even on the fastest platforms due to performance. So its only use would be as a reference implementation.

Other than that, there's no obstacle to porting it to flycast when it's done.

klepp0906 commented 4 years ago

ah, thats all good info - i appreciate it. Well, if even the best pc's wouldnt be able to emulate DC on a software level that means 2 things.

1) its implementation would be purely for "down the road" which is still good or nobody would be working on it i suppose.

2) apparently the fact that the dolphin cores software renderer isnt working at current seems like its also moot as if the DC cant be emulated software wise I imagine the wii would be just as bad if not worse. Though begs the question why its in there as an option at all albeit non functioning ;p

huge thanks for your work on this stuff brother <3

barbudreadmon commented 4 years ago

I'm wondering what's the purpose of a software renderer here (except for the sake of it), my understanding of software renderers is that it's somehow easier to reproduce original hardware behavior with them ("old gpus don't work the same as our modern gpus, so let's rely on cpu" or something along those lines), however, nowaday, with the flexibility provided by compute shaders, are there still such limitations for hardware renderers ?

klepp0906 commented 4 years ago

in general theyre supposed to be much more accurate. Apart from that, for me specifically

1) recording doesnt work with hardware rendered cores

2) i use gpu-screenshots "off" as I like for my captures to be at the internal resolution and not be shaded etc. Hardware rendered cores also ignore this.

flyinghead commented 4 years ago

Compute shaders are the way to go to have both pixel-perfect rendering and decent performance.

barbudreadmon commented 4 years ago

@klepp0906 that's weird, i'm getting pretty good results with hardware renderers and recording on retroarch

klepp0906 commented 4 years ago

@flyinghead if that solved the screenshots/recordings being forced to ginormous 4k resolution id be all for it. Of course i like accuracy, but in this case, its further down the list of motives (for me).

@barbudreadmon its funny you mentioned that. I posted in the RA discord regarding beetlepsx specifically. I would hit record, and it would pop back into the game as if it were recording, cept it werent.

I changed it to software renderer, it worked fine. Initially i thought it a beetle psx hw issue and someone in discord piped up and said hardware cores have a problem with recording.

Sure as shite, i tried every other hardware core im aware of (flycast & dolphin) and neither would record.

thats how i discovered that this doesnt have a software render option, and dolphins doesnt work lol.

pains me that it works for you, wondering if i should make an issue report for that specifically in the general libretro tracker or if one already exists.

flyinghead commented 4 years ago

I was thinking in more general terms. I don't think it would solve your issue since it'd still be hardware/gpu rendering.

klepp0906 commented 4 years ago

@barbudreadmon so found the issue on the hardware cores. it requires gpu recording to be on.

as i indicated previously i try to stay away from using that due to the incredible size it makes everything (& it allows me an easy reference to default resolutions) but it also entirely murders streaming.

its basically impossible to stream shaded 4k content even with a 8700k/2080ti. It just murders it.

so no matter how i slice it, ill have to toggle things depending on task at hand. Oh well.

would be great if hardware vs software wasnt such a hurdle in terms of whether gpu recording/screenshot does or doesnt work.

is that something thats resolvable with some code and ingenuity or is it something more fundamental/impossible to solve?

fallaha56 commented 4 years ago

in some good news this seems to have been pulled off for the N64 via Parallel, amazing Vulcan compute renderer

100% perfect Angrylion software recreation on GPU

even upscaling is possible by tweaking the LLE

hopefully many emus will now go this way?