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
Hardware tessellation #9210
Hardware tessellation #9210
Conversation
…s for hardware tessellation.
Sweet! |
@Orphis does OpenGLES 2.0 to support this ? |
For GLES problems I think it will be enough to define all the texture 1D stuff as 2D(with 1 height) and GL_CLAMP defined as GL_CLAMP_TO_EDGE. Imo this will not be usable on mobiles through, this sure can be faster on desktops with powerful dedicated gpus, but that shader is actually extremely heavy and will tank fps down harder than software implementation in less optimal situations. Certain gpu's like those older mali's might just fail to compile it. ~ Would be good to also gray out "Spline/Bezier curves quality" setting when Hardware Tesselation is activated since it doesn't affect it in any way. Either way, nice work:3. |
That look good , and it's very nice to support other backend and older like DX 9 , OpenGLES 2.0 |
@LunaMoo Thanks for advice and fix them. |
Note: Information about to fix compatibility with GLES 2.0 or older glsl version. Using new APIs
|
Really nice work! I'll be able to review it in detail soon. Only concerns are if the additional shader bits would impose any performance hit somehow (probably very little), and obviously possible compatibility issues on mobile hardware, as commented. |
I will going to review that |
When saying about defining 1D to 2D on GLES I was thinking about something like this. Didn't really tested that code on GLES device ~ hopefully works;p, but we definitely want to keep 1D where possible(aka OGL) - from a quick test Thundaga in FF4 the performance of the shader drops to 50% with 2D compared to 1D.:| |
This is only for spline curves right? |
Frame profiler buildfix.
@xebra tested on my PC , using GTX 950 , OpenGL Backend , that look good and compability well and didn't have isssues , and perfomance for me seem not different too much at all |
@zminhquanz Thank you for testing:) |
Does any other game benefit from this change or just FF4? |
@DonelBueno here is the list of game using spline / bezier Puzzle Bobble SPLINE: Loco Roco 1 , 2 BOTH: |
…are tessellation.
…tion with dx9 and vulkan.
@hrydgard I tried rebase and fix your request and push them. Brand new commits are just last 4 commits. |
Hm, looks like you rebased on an earlier commit than master because some of my stuff is in there that shouldn't be (like the >> to << change). So probably the master in your client that you rebased on wasn't updated to the upstream master. Still, looks like it's free of conflict. |
I was wrong something... |
@xebra you can go to the wiki to see how to keep pull request up to date |
@zminhquanz Thanks! Hmm, I'm using Tortoisegit on Windows but I think my way is almost same as the guide.
Maybe, I think my mistake is "pull origin"... |
5 should be done before 3... Or in cmdline git, on your branch:
|
So apart from the rebase, what remains now? I'd like to merge this soon so I can do other changes and cleanup. |
Remains are other backends implementation, but it's not done and need more time. |
OK, let's do it that way. I will do a rebase before merge to avoid duplicate commits in the history. |
I cherry-picked your commits to a new branch, #9226 . I think I'm gonna merge that instead, once the buildbot is happy, for a cleaner history. |
I didn't find this option in iOS version of ppsspp any idea please? |
Take it easy, it has not even been merged yet. Soon, though can't guarantee it'll work on iOS right away, this is still work-in-progress. |
@hrydgard That sounds great! I appreciate your help. |
@hrydgard I edited my comment above before you reply. Yeah it seems not merged yet. |
@xebra nice work. It's really appreciate a lot. |
@iOS4all Thanks :) |
I implemented hardware tessellation, currently only on OpenGL.
This is using technique called "instanced tessellation". That is using basic method "instanced rendering". And you can find a simple bezier sample implementation here (http://developer.download.nvidia.com/SDK/10.5/opengl/screenshots/samples/instanced_tessellation.html).
Of course, I know NVIDIA's sample code is licensed under the proprietary license, so I rewrited alsmost everything.
Anyway, this implementation doesn't use so modern API like "tessellation shader", so I think I can implement it to DX9 or other backend.
Well, I think this codes needs to fix compatibility with GLES or other glsl version because I only tested with Win7 64 and I don't implement any compatible code yet.
Here's the some performance test.
Tested with FF4CC in DEBUG mode
Thundaga
Software tessellation is FPS 6
Hardware tessellation is FPS 60
Mist dragon morphing
Software tessellation is FPS 21
Hardware tessellation is FPS 60
You can find the option here!