godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.02k stars 21.17k forks source link

Add Vulkan renderer #3729

Closed Marqin closed 7 years ago

Marqin commented 8 years ago

Hi!

It would be nice to support Vulkan API, since it's already released.

LifeIsStrange commented 8 years ago

Wtf "vulkan is only supported on linux and partially on windows . is pointless to add support right now. maybe in a few years" Good driver crossplatform support will come in the next months not the next years...

ShabbyX commented 8 years ago

So, I'm thinking of adding experimental Vulkan support to godot. I just like to know if the developers are at all open to accepting a pull-request about it.

vnen commented 8 years ago

@ShabbyX you should probably hang around the IRC chat and talk to @reduz. If you follow the discussion, you can see that a rendering engine rewrite will be happening soon (to support Open GL ES 3.0) and if you use the current engine you'll certainly need to rewrite it for Godot 3.0.

ShabbyX commented 8 years ago

@vnen, thanks for the info

reduz commented 8 years ago

Please wait until we finish the GLES3 renderer in a few months, which will lead us to severely changing the rendering API. Once it stabilizes again feel free to work on one, as it should not change muh more

On Aug 11, 2016 14:00, "Shahbaz Youssefi" notifications@github.com wrote:

@vnen https://github.com/vnen, thanks for the info

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/godotengine/godot/issues/3729#issuecomment-239223290, or mute the thread https://github.com/notifications/unsubscribe-auth/AF-Z21hBWryu2qSBTr6i_fxnfvWhY0WGks5qe1UVgaJpZM4HbRXC .

ShabbyX commented 8 years ago

@reduz, Alright. Just pay attention that keeping Vulkan in mind would certainly affect the design of the API. In particular, Vulkan likes it if you can declare up-front what resources (images, buffers, shaders) you use, what pipelines there are etc. So when designing the new GLES3 design, try to make it possible for all such information to be available before rendering start. Better yet, before even the game or "level" starts.

techtonik commented 8 years ago

I guess this approach helps to detect requirement from target system when compiling game, so that user can be warned if his 2D game relies on some highly slow shader that is not available on all platforms.

benrstraw commented 8 years ago

Unity just unveiled a preview of their Vulkan editor. I know there has been a debate in this thread about the merits of Vulkan, but Unity is citing speed as the largest benefit of Vulkan, claiming a 35% increase in frame render times on Android.

volzhs commented 8 years ago

But to gain 35% increased performance, IFIAK, it requires Android N (7.0). Currently, less than 0.1% devices of all android platform.

Marqin commented 8 years ago

Unity just Actually it was unveiled 2 weeks ago by some Unity devs - https://pbs.twimg.com/media/CsLexLkXgAUjvS7.jpg:large

techtonik commented 8 years ago

Are there any software emulation drivers for Vulkan?

Calinou commented 8 years ago

Are there any software emulation drivers for Vulkan?

Not that I know of. I think the performance would remain problematic anyway, even with a generally faster renderer, especially on mobile devices.

techtonik commented 8 years ago

ANGLE is being ported to Vulkan, so it should be possible to use it as an OpenGL driver https://chromium.googlesource.com/angle/angle/+/master/README.md

avril-gh commented 8 years ago

I understund, but who care about smartphone "Games"?

The whole healthy living world cares.

PC's, in most short words, when it came to games always was "not compatible with everydays real life". Players had to either drop games and go to work to live, or rust along with PC while not working, leveling game character whole day and night, but then how would they water up his game industry to grow ? This situation had eventualy chance to outlast at some level, because of no other alternative and devotion of many developers who create new things more for intelectual pleasure than dough.

However, the alternative has arrived and now player devotion to his games no more collides with healthy real life. Hardcore gamers might work, go to school, do whatever, still having his games along with them whole time, play anywhere and anytime like real hardcore gamer like to do. (some games like for eg. Pokemon GO went allready even further and blends with real life litrally)

Because, theres more people who "have life" (therefore cash) and who thanks to mobile devices might still become hardcore gamers 24/7/365 (without dilemma life or gaming) - mobile games industry incredibly grows.

Global Games Market statistics below mobile games 45% with 50 Billion revenues and raising while PC market 25% constantly going down, not mention stationary consoles which sink along with PC. Look at the progression of statistics.

newzoo_global_games_market_revenue_growth_2015-2019-1

GL ES I see here and also following discussion about GL ES 3 in many other threads.

I think, expanding to GL ES 3 is good idea, as its obvious that while time passing GL ES 3 will be turning out more common, eventually replacing GL ES 2 somewhere in the future, however for the time being when i think about it - it not looks that easy as it might seem.

If you look at the market and customer behaviours its not hard to notice that not everyone lightly buy stuff like Samsung Galaxy S7 each fiew weeks. These are top of the mountain.

Majority of customers like in every shoping area, are lead by typical scheme, to buy best possible thing for lowest possible price. So the middle price shelf, is always in very good condition, having high sales for the masses, especially while chinese manufacturers, importers and sellers around the world, exploiting this by feeding market with very nice brand new devices which looks, feels and works like top ones, just have no Samsung or iPhone logo and costs 2 or 3 times less. (like customers used to say)

Customers know that its good to have more RAM, cores, speed, flash, most recent android version ect, but many people dont know (care) what lies deeper (how it work), what is GL ES, or that it even exists. These areas are where manufacturers cuting costs using fast multicore chips (eg. MT6592 octa core CPU @ 2Ghz, sounds nice isnt it ?) yet at nice cheap price because of Mali 4XX or similar GPU's.

All in all we can assume, that while android versions will raise, the GL ES version will not follow it at the same speed, because of what was said above, and might stay around for little longer than we expect.

According to google app store theres still around 50% of devices which use GL ES 2, and people buy new phones with it. In this situation, how will one explain to someone (ex. 50% of game users which may be 1 million of people) who will came and say "Why this game works much better on my friends phone and lags badly on my ? i have Android 6.x, 8 core CPU, lots of ram, Just bought this phone yesterday, can you fix it ?". Replying in google store to such comments, the way - "go buy new phone" is a thing i would never do...

I strongly believe that while GL ES 3 will be in process of implementing, when all 3D coding gurus will awake and give his attention to this task, many new, cool and awesome ideas will come out, which might put new light on GL ES 2 optimisation that arent so obvious today and lies hidden in shadows.

NathanWarden commented 8 years ago

Juan has been working on a new renderer for Godot 3. I'm going to make the wild assumption that, while it probably won't contain it, he's probably at least keeping Vulkan support in mind.

edit: Meaning keeping the code flexible enough to add it at some point in the (probably distant) future.

https://twitter.com/reduzio/status/778983748532629505

Marqin commented 8 years ago

@reduz said on many ocasions that Godot will not support Vulkan yet - with 3.0 there will be only update to GLES 3 and new PIR renderer

NathanWarden commented 8 years ago

There's really no point in @reduz implementing Vulkan support now anyway. Most games being made in Godot aren't performance hogs. If your game is performing poorly there is probably something else that can (and should) be done to improve it.

I personally love the many new improvements they've done that probably wouldn't exist had he been spending time on learning and implementing Vulkan. Pushing it off for a while will probably result in a much better Vulkan renderer because more "best practices" and "common pitfalls" will be more well known and easier to research in a year or three. :)

Marqin commented 8 years ago

Godot renderer isn't good and compicated enought to even need Vulkan :D First let's implement some good graphics and then think about APIs. Just using Vulkan won't make your game beautifuly automagically.

Godot aren't performance hogs.

And if they are, they mostly hog on CPU because of GDscript and not on GPU.

ghost commented 8 years ago

From what I read in other posts by Juan he mentioned several times that GLES 3 is going to be supported for Godot 3.0 but that Godot will eventually support Vulkan just not right now. Since the contribs and lead devs on Godot are a handful I think he is trying to allocate time and resources to what makes more sense in the short run. Vulkan needs to be more mainstream perhaps in a few years .

volzhs commented 8 years ago

At the bottom line, Godot will support Vulkan someday, but not near future. If someone made a game with Vulkan, it's just for a few gamers in all kinds of game platform market.

techtonik commented 8 years ago

Running Godot on Vulkan once GLES 3 is ready is possible if ANGLE support is added as alternative graphics server.

Marqin commented 8 years ago

AFAIK ANGLE is already used in Godot in UWP builds.

vnen commented 8 years ago

Adding ANGLE support for other platforms should be (relatively) trivial.

supagu commented 7 years ago

Saw this news, thought id post. Not sure if its of use or not... https://www.gamingonlinux.com/articles/amd-have-announced-anvil-an-mit-licensed-wrapper-library-for-vulkan.9378

khinbaptista commented 7 years ago

I'd like to say that I'm starting to work on my thesis, which is to create a Vulkan renderer for Godot. My intent is to learn how to use Vulkan and contribute to this awesome project. I also believe adding this feature can attract more users to the engine.

I can't promise anything and this is totally unofficial. It's also the first time I make any kind of contribution to an open source project, so I hope it all goes well.

I will be using the GLES3 renderer features, and I don't intend to add any other new features to the engine, at least not for now.

alugarius commented 7 years ago

This comment history is awesome, @LifeIsStrange got destroyed!! #rekt

akien-mga commented 7 years ago

Cool, but this is no corrida and we don't need retrospective commenters.

LifeIsStrange commented 7 years ago

@alugarius Destroyed is a childish word.. I advocated Vulkan and that was not dumb, in parralel of his avantages, it would have done much publicity to Godot as an early adopter engine and hence perceived as "future-proof",but we can't go back in time.

alugarius commented 7 years ago

@LifeIsStrange If you would have read the comments, you would have seen that Vulkan will be supported somewhere in the future. But as of now, there are more reasons to use gles3.

@akien-mga sorry, couldn't hold me

reduz commented 7 years ago

Closing. Not going to happen as it's way more cost and effort than benefit. Will most likely switch in a few years.

However, if anyone else wants to make this port and maintain it (unlikely due to how much work it takes), feel free to do it. Core devs will not work on it.

reduz commented 7 years ago

If you are interested in working on a vulkan renderer, please open a new issue/PR.