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 77 forks source link

(Feature Request) Per-Pixel Alpha Sorting outside of OpenGL 4.3 and Vulkan renderers? #1079

Open ehw opened 3 years ago

ehw commented 3 years ago

Currently Per-Pixel Alpha Sorting is only supported on the OpenGL (4.3 or higher) and Vulkan renderers, I believe. Many games require this setting in order to run without any graphical issues, but it doesn't seem to be supported in other renderers or other earlier versions of OpenGL. This causes a problem with something like the UWP version of Retroarch where you won't be able to play games with higher accuracy, like on the Xbox (which is what I'm primarily using).

I'm not sure if there's a solution for this other than to wait for devices to support the newer versions of OpenGL or Vulkan, but I was curious if something could be done to at least get support for this setting working on more hardware configurations...

barbudreadmon commented 3 years ago

The required api calls don't exist with older opengl api, as explained in the blog posts that introduced that feature, so afaik it's impossible.

I'm not sure if there's a solution for this other than to wait for devices to support the newer versions of OpenGL or Vulkan

Probably never gonna happen, xbox only supports direct3d, and there is only that much you can do with the wrapper that transform opengl api calls into direct3d api calls. This is the same problem as moltenVK to transform vulkan into metal on macos, you'll never reach 100% compliancy. This is why xbox was always a very average choice for an emulation box, since so many emulators are optimized for opengl/vulkan.

I guess your best bet would be to start a bounty to develop a native direct3d renderer for flycast, good luck with that.

ehw commented 3 years ago

Actually, there's apparently a DirectX9 branch that was feature complete as of February this year. I actually didn't know that flycast had another repository, I thought this was the main one. lol

https://github.com/flyinghead/flycast/tree/fh/directx

So this might be a solution. Although it being DX9 I'm not sure if it'll have the support necessary for per-pixel. @flyinghead or @twinaphex might know more...?

flyinghead commented 3 years ago

DX9 isn't enough for per-pixel. This renderer is for potatoes that can't even run opengl 3 properly.

Per-pixel would require DX11 at least.