godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.07k stars 69 forks source link

Readd GLES 2 support in Godot 4.x #10044

Open ahmutkadim opened 1 year ago

ahmutkadim commented 1 year ago

Godot version

4.0.3

System information

macOS 13

Issue description

I am currently using Godot 4 and still Gless 2 renderer is not implemented. I followed through all development builds but none of them included such future to my knowledge. I think this renderer is very important since Apple only supports that in their mobile devices so it is crucial for web games. When will it came?

Steps to reproduce

Export the project as a web build and try to run it on IOS

Minimal reproduction project

None

mrjustaguy commented 1 year ago

GLES 2 isn't officially planned in 4.0. see https://godotengine.org/article/about-godot4-vulkan-gles3-and-gles2/

AThousandShips commented 1 year ago

Apple only supports that [GLES 2] in their mobile devices

Can you provide a source for this? Afik they've deprecated support of GLES on iOS

clayjohn commented 1 year ago

iOS supports OpenGL ES 3.0 https://developer.apple.com/documentation/opengles

What iOS doesn't yet support is WebGL2 which is needed to run Godot 4 on the web. iOS only supports WebGL which corresponds to OpenGL ES 2.0.

ahmutkadim commented 1 year ago

I may have phrased my problem wrong. Yes OpenGL might be supported in new versions in IOS but it still does not help. Apple might support different rendering techniques as well but still my testings indicate that my Godot games made in Godot 4 cannot be opened in any IOS device. I have tried various IOS devices but it does not work. However in mobile Godot 3 worked since I was using Gless 2. What may I do now ?

AThousandShips commented 1 year ago

Any reason you have to export for web and not directly for iOS? Please make it more clear in the issue report that this is specifically for the web and not related to exporting for iOS

ahmutkadim commented 1 year ago

It is costly and hard to publish an app on App Store and I prefer publishing my games on web since it is more accessible for all users. But this rendering problem hinders such accessibility.

AThousandShips commented 1 year ago

That's understandable, but unfortunately this is a limitation on the side of Apple, and as the article above on the reasons for this says there's a lot of reasons for this decision, and the prospects for future support

ahmutkadim commented 1 year ago

Okay I understand.

ChronoDK commented 1 year ago

iOS supports OpenGL ES 3.0 https://developer.apple.com/documentation/opengles

What iOS doesn't yet support is WebGL2 which is needed to run Godot 4 on the web. iOS only supports WebGL which corresponds to OpenGL ES 2.0.

iOS does support WebGL2, and has had it enabled per default since version 15. There is some issue with Godot 4.x currently, that prevents it from running.

This is the error I get: image

AlexBowring commented 6 months ago

The response to this issue speaks volumes. Obviously people are going to be using the Godot engine to make games that they want to be accessible to everyone. If, because of the renderer Godot is using, those games can't be played on apple devices (the biggest company in the world), then surely its in Godot's best interest to themselves as well as their users to provide a solution to ensure the games are accessible on apple devices, rather then say its a problem of Apples. This sort of thing is a real put off, and its even more frustrating that this problem didn't exist in a previous Godot version but does exist in a newer version.

dineth-lochana commented 5 months ago

Being Pragmatic is the best here. I myself can't run Godot 4 due to a weird quirk of the Intel HD 3000 on WIndows. So, I am using Godot 3 for now. Is it good? No. Am I that happy with it? No. Then again if there is no support for it in Godot4, no one has interest in implementing it. It is what it is.

causal-guide commented 3 months ago

we need it

Naming-things-is-hard-btw commented 1 week ago

well how hard would this be to implement? i mean.. i've made some [terrible] 3d renderers in c++ in the past and i'm willing to put my time into this since most android devices support gles3 but very poorly so on a phone gles2 is a must

ill try to help with this but i cant promise anything... but still i might be too dumb for this so any help would be cool

AThousandShips commented 1 week ago

It's not just a question of how difficult it would be to implement, but how difficult it would be to support a fourth rendering mode and set of shaders and workflows, having two backends for compatibility would add a lot more maintenance work

The compatibility backend with the features of gles3 is already behind and cut down, going even lighter and more simplified and less powerful with gles2 might be too far to justify the work, would it not be better to use Godot 3.x if you need to target such devices? Could they even run the rest of the Godot engine? CPU power, ram, storage, etc.?

Like, realistically, what is the market for:

The main reason I'd say to run Godot 4 on a device like this is to be able to run more advanced stuff on other devices, but if you just want the power and features that can run on such a device I'd say Godot 3.x is a far better choice

Naming-things-is-hard-btw commented 1 week ago

It's not just a question of how difficult it would be to implement, but how difficult it would be to support a fourth rendering mode and set of shaders and workflows, having two backends for compatibility would add a lot more maintenance work

The compatibility backend with the features of gles3 is already behind and cut down, going even lighter and more simplified and less powerful with gles2 might be too far to justify the work, would it not be better to use Godot 3.x if you need to target such devices? Could they even run the rest of the Godot engine? CPU power, ram, storage, etc.?

Like, realistically, what is the market for:

* Devices that doesn't support gles3

* Has enough CPU and memory to run Godot 4.x well enough to justify using Godot 4.x

The main reason I'd say to run Godot 4 on a device like this is to be able to run more advanced stuff on other devices, but if you just want the power and features that can run on such a device I'd say Godot 3.x is a far better choice

but if a devoloper wanted to make a simple game (2d game for example) they would want it to run on all devices that can render 2d right?

maybe a better solution would be is to make the rendering part in godot extendable via plugins? so if someone wants gles2 they just make a plugin for that?

AThousandShips commented 1 week ago

but if a devoloper wanted to make a simple game (2d game for example) they would want it to run on all devices that can render 2d right?

Then Godot 3.x would be better suited I'd say, if you don't want all the advanced features in 4.x, 4.x takes more performance even when not using all the extra stuff because of basic limitations

4.x has higher minimum requirements to allow for higher end features and performance, it's hard to have very low and very high levels in one engine

Naming-things-is-hard-btw commented 1 week ago

but if a devoloper wanted to make a simple game (2d game for example) they would want it to run on all devices that can render 2d right?

Then Godot 3.x would be better suited I'd say, if you don't want all the advanced features in 4.x, 4.x takes more performance even when not using all the extra stuff because of basic limitations

4.x has higher minimum requirements to allow for higher end features and performance, it's hard to have very low and very high levels in one engine

well yea i kinda agree with this but isnt backporting featues (especially gdscript features) harder than having a third renderer? there are alot of bugs fixed in godot 4 but are still there in the newest godot 3.6 releases

Naming-things-is-hard-btw commented 1 week ago

but if a devoloper wanted to make a simple game (2d game for example) they would want it to run on all devices that can render 2d right?

Then Godot 3.x would be better suited I'd say, if you don't want all the advanced features in 4.x, 4.x takes more performance even when not using all the extra stuff because of basic limitations

4.x has higher minimum requirements to allow for higher end features and performance, it's hard to have very low and very high levels in one engine

with having a gles 2 in godot 4 there will be no need to mantain godot 3 at all

AThousandShips commented 1 week ago

So then my question remains: How large is this potential market for devices that don't support gles3 but can run Godot 4? If there is that's a valid argument that this is something to consider, otherwise there's no point at all to support gles2

with having a gles 2 in godot 4 there will be no need to mantain godot 3 at all

Not that simple, as I said, Godot 3 has very different hardware and performance requirements

Naming-things-is-hard-btw commented 1 week ago

So then my question remains: How large is this potential market for devices that don't support gles3 but can run Godot 4?

with having a gles 2 in godot 4 there will be no need to mantain godot 3 at all

Not that simple, as I said, Godot 3 has very different hardware and performance requirements

i might have worded it poorly [sorry] im talking about phones not desktop, we cant ignore the fact that phones are alot slower in rendering power than cpu power they can handle cpu heavy tasks but even a simple shader completely kills the device

i did some tests and on my phone godot 4 runs flawlessly when we talk about cpu usage but it struggles to render things

Naming-things-is-hard-btw commented 1 week ago

So then my question remains: How large is this potential market for devices that don't support gles3 but can run Godot 4? If there is that's a valid argument that this is something to consider, otherwise there's no point at all to support gles2

with having a gles 2 in godot 4 there will be no need to mantain godot 3 at all

Not that simple, as I said, Godot 3 has very different hardware and performance requirements

since you say that gles2 isnt important then why all unity [android] games support it

AThousandShips commented 1 week ago

since you say that gles2 isnt important

I didn't say anything like that, take a moment to read what I'm saying again

Naming-things-is-hard-btw commented 1 week ago

So then my question remains: How large is this potential market for devices that don't support gles3 but can run Godot 4? If there is that's a valid argument that this is something to consider, otherwise there's no point at all to support gles2

with having a gles 2 in godot 4 there will be no need to mantain godot 3 at all

Not that simple, as I said, Godot 3 has very different hardware and performance requirements

heres the point u said "How large is this potential market for devices that don't support gles3" but im not talking about devices that doesnt support gles3 im talking about the huge list of devices that (fake) supports it that its filled with bugs and and performance issues to the point its not usable

AThousandShips commented 1 week ago

Yes, that's what "doesn't support gles3" means, I'm sorry I thought it was obvious, that isn't supporting gles3, it's claiming to support it

Zireael07 commented 1 week ago

@AThousandShips In that case the list is pretty big - most Mali and Adreno mobile GPUs claim to support but do not really resulting in endless bugs and/or poor performance

AThousandShips commented 1 week ago

A lot of those are being worked on, but that was the primary question, but the central point remain: Adding gles2 would involve a lot of extra work and extra maintenance for a feature targeting a relatively small niche of targets probably better served by 3.x, also it being pretty specific and niche makes it harder to maintain, with fewer users using the gles2 backend meaning fewer reports and feedback and testing

It's not simply a matter of adding some code and being done, the gles3 renderer takes a lot of maintenance already, especially with driver capacity etc., including handling the weird quirks of some drivers

But according to the documentation there's no plans or intentions to add gles2, see here

Naming-things-is-hard-btw commented 1 week ago

A lot of those are being worked on, but that was the primary question, but the central point remain: Adding gles2 would involve a lot of extra work and extra maintenance for a feature targeting a relatively small niche of targets probably better served by 3.x, also it being pretty specific and niche makes it harder to maintain, with fewer users using the gles2 backend meaning fewer reports and feedback and testing

It's not simply a matter of adding some code and being done, the gles3 renderer takes a lot of maintenance already, especially with driver capacity etc., including handling the weird quirks of some drivers

But according to the documentation there's no plans or intentions to add gles2, see here

the thing is that devices that support gles3 but run it poorly is HUGE not small almost all chinese brands and even some mid samsung devices have this issue buggy drivers is the problem that made unity not completely remove gles2 and keep it as an option which is the default for most android developers

Naming-things-is-hard-btw commented 1 week ago

welp... i guess were back to unity :/

akien-mga commented 1 week ago

Moved this to godot-proposals as this isn't a bug but a feature proposal.

Implementing a GLES2 renderer for the modern rendering architecture of Godot 4.x is difficult, which is why it hasn't been done.

If someone wants to have a go at it anyway, feel free to. But this isn't a priority of the rendering team at this stage. Instead, we focus on making the current GLES3 compatibility renderer actually perform properly on devices that support GLES3 (oftentimes with drivers bugs like Adreno 3xx GPUs, which we try to workaround).

If your project depends on GLES2 / WebGL 1 support, then indeed Godot 3.x is still a supported engine and well capable for the kind of games that would run on very low-end GLES2 only Android phones.

dsnopek commented 1 week ago

@Ansraer was working on implementing GLES2 / WebGL 1 support for Godot 4, but the last I talked to them about it was in November at GodotCon, so I don't know the status of that effort.

Gnumaru commented 1 week ago

@ramatakinc where also working on a 2D only GLES2 renderer, which was announced on october 2023

https://x.com/RamatakInc/status/1710331907395764283

But there is no activity on their godot fork on github so I assume they either gave up or they are workin in a private repository. I assume both things happened.

I would also like a gles2 renderer but I do admit that with the current resources available it just can not happen.

Maybe the best cost effective solution would be either allow implementing renderers using gdextension OR, even less than that, just create tutorials in the docs, using the already existing gles 3 renderer as an example, about how to create and add a new renderer as a core module. For example, If I just wanted to copy/paste the gles3 renderer module directory and make it available as a new renderer, how would I do that? I have no idea. I assume that just copy/pasting wouldn't even compile or, if it would, the "new renderer" would not be available, probably I would have to change many more things outside of the module itself.

edit: Wait a minute. It seems this Ansraer guy works with Ramatak for his godot fork has branches with names starting with "ramatak_". Also their godot fork have a branch named "gles2_v3_mar2024".

image

Calinou commented 1 week ago

Maybe the best cost effective solution would be either allow implementing renderers using gdextension

See https://github.com/godotengine/godot-proposals/issues/4287.

octanejohn commented 6 days ago

the link to the branch is https://github.com/Ansraer/godot/tree/gles2_v3_mar_2024

PeterMarques commented 1 day ago

Its a issue for me too, and the main problem as why i still use godot3, and even avoid 4 for any project in the future.

this would make godot4 a indeed substititute of the previous version, as said here already, even at cost of a little more bootstrap performance costs.

There will be a time when godot3 will lose complete dev support, and then real problems are gonna start happening, if this is not addressed.

We need to migrate ALL code base with the mainline of a product, not "if you do AAA use the latest" otherwhise, "just use the old mantained"... This is not a great practice.

Every latest version should support OLD! machines. Even at cost of performance/functionality.

What can be sugested, if not already, is a way to support ALL backends at the same time. (it was. https://github.com/godotengine/godot-proposals/issues/1609)

If such a orchestrator is enabled on, it shall go on a cascade of backends fallback, going from Advanced vulkan to GLES2 / WebGL 1, on the fly, and as a selector on the exported.

On the fly on the web, would provide performance and compatibility at the same time to the diverse enduser devices.

I really canT move to godot4, heck, not even godot3 MULTITHREAD on the web, because of apple devices.

Its just a fever dream to have godot4 with threads and gdextension at the same time on the web across "all" devices. I wanna wakeup and have it as a reallity, too.