-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
GLES2 support for shadow mapping shaders #11339
Comments
Why was the crash report mention removed? (Is it because it's not useful?) |
Also I'm not sure how this is a feature request? Isn't the shadows option obviously buggy on GLES2? So maybe disable it on GLES2 to prevent users from breaking their game? (At least until it's supported or something). |
Yep.
Saying "shadows do not function on GLES2" is no different from a request to make them work. |
That actually depends on who says it and their intentions, I never thought you guys might be able to support shadows for GLES2 in the first place (with all that amount of errors I've seen in-game), so the summary and the steps to reproduce pointed out to issues. Eitherway good luck getting the shadows on GLES2 working if you guys are willing to, if I see some PRs for that I'll try to help in testing them. How do you get Minetest reports to show where it crashed at rather than just symbols? were the artifacts not set to debuggable or something? I think making a custom build (with all the debugging help) might help in getting what that crash report was about, I'll try my hand at that. |
Due to limitations in OpenGL ES 2.0, implementing shadow mapping for this platform will require significant effort, beyond fixing shader compilation errors. It looks like there is little interest in this functionality overall, so I suggest documenting that dynamic shadows do not work on OpenGL ES 2.0 hardware and optionally disabling configuration in the UI. |
"It looks like there is little interest in this functionality overall" I wonder where this is coming from? Not even release versions have this feature, and it's pretty closed off. (It not working on GLES2 doesn't help in measuring either). |
This feature request has no reactions (compare to 11547 and 11366), and Discord community has not shown interest to far. |
Those aren't good basis for an assumption. As I said: (It not working on GLES2 doesn't help in measuring either)." Are you guys even sure you have that many Android debug build testers? I know the majority use release builds which don't have the feature yet. If you want to measure interest in something you need a proper working version of it in the first place. |
I might not have expressed myself correctly or clear enough. Porting shadow mapping to GLES2 is difficult, and in order to even start doing that I need some indication of interest in the community. Quick comparison to other feature requests did not play in favor of this feature and a ping in Discord has resulted in only your response. Even if, supposedly, we have a large Android user base, not many of them are active participants of Minetest community, otherwise I would expect a different reaction. If you still think that dynamic shadows on GLES systems are an absolute must in the nearest future, I'd suggest reaching out to community to find more voices in support of the feature. That said, I have already spent some time poking around, and some work is captured in shadows_gles2 branch in my repository. It did not work for me on a Raspberry Pi, but it may work for you on an Android. |
Here this shows how large the base is for Android players (if you had any doubts): I'm not sure why you're suggesting to me to find more voices in support of the feature, since you already think not many of the Android player base are active participants in the community. How much voices do you need until it's actually reconsidered for you though? In any case here I made a forum post if you want to follow it: About the test branch: I'm only getting this for now:
Also this comment here by sfan5 on the first dynamic shadows PR is maybe of help here: |
I'm not able to get to a computer a lot of the time, so my main platform for Minetest is on Android. So if you need voices to advocate for Android I and a few of my friends all use Android. |
@AbduSharif Can you try to disable Poisson filter? I'll check whether I pushed all the changes to the branch later. |
Okay, will try it. |
So I no longer see an error with that option disabled, but I don't see any shadows either. Probably what sfan5 mentioned in his comment here what could be remaining (although I'm no developer of course): |
I've already made the changes mentioned by sfan5, syntax is not the problem now, it's the (lack of) support for texture formats with the right precisions. Redoing SM for textures supported on GLES2 is essentially starting almost from scratch, and it took a year to do SM in the first place. My hope right now is that we can find some GLES2 hardware that has the right extensions to support what's needed without drastic changes. Can you also try with 16bit shadow textures on a very low preset? |
I did try that but no shadows. Can you specify what the texture format extension you're talking about is? |
@AbduSharif The extension is OES_texture_float, but judging from what Godot implemented and what you and I observe, it does not work with render buffers, and GLES2 does not allow reading from the depth buffer. As a result shadow must be decomposed into 4 byte components in a GLES2-compatible texture format. This change of texture format will require compatibility changes to the shaders and is not compatible with the incremental shadow rendering, so that will need to be redone for GLES2. |
what about ogles 3? i think its will be easier |
We don't have a dedicated driver for it, so it will have to run through the prism of gles2 plus extensions. |
Doing it for GLES2 doesn’t worth the effort IMO. Any device powerful enough for dynamic shadows should support GLES3. Using that is not a short way either, adding GLES3 support to the unified driver should be easy but it can only run on SDL currently, and Android/SDL is only planned (minetest/irrlicht#175; although I had a working PoC somewhere, it’s not that hard actually) — but it is the right way. |
Minetest version:
OS / Hardware:
Operating system: Android 10 arm64, but I'm using armv7 apk
CPU: MediaTek Helio G80
GPU model: Mali-G52 MC2
OpenGL version: OpenGL ES 3.2
Summary:
Shadows don't work on android, if I switch to ogles2 then enable shaders and shadows, then open a world; the game will be black.
If I close the game and then re-open it, it will crash.
Steps to reproduce:
The text was updated successfully, but these errors were encountered: