AOF-Dev / MCinaBox

MCinaBox - A Minecraft: Java Edition Launcher for Android. An Encapsulation of [CosineMath's BoatApp](https://github.com/AOF-Dev/BoatApp).
GNU General Public License v3.0
1.27k stars 179 forks source link

Newer GL4ES version to get OpenGL 2.1 support for low spec shaders? #204

Closed Grima04 closed 3 years ago

Grima04 commented 4 years ago

Hello, I wanted to ask if it would be possible to integrate a newer version of GL4ES into the runtime pack of MCinaBox to get support for OpenGL 2.1 and thus also for low spec Minecraft shaders which use OpenGL 2.1. At the moment the GL4ES wrapper version used seems to wrap only up to OpenGL 2.0, at least that is what is being reported by Optifine. Below is a screenshot of what currently happens when I try to load a shader pack (the landscape might look a bit strange since I was using the Aether II mod for 1.7.10 with Forge):

Screenshot_20200611-150100

artdeell commented 4 years ago

The shader conversion is still very crude, so even lowest spec OpenGL2.0 Shader doesn't work.

artdeell commented 4 years ago

I talked to ptitSeb but I think is there's only one way: glsloptimizer from libRegal.

artdeell commented 4 years ago

It works surprisingly well with Tegra shaders, so I don't think it's not going to work with MC

artdeell commented 4 years ago

@FrankOu2001 did you said that GL4ES version is dependent on mobile phone? Really? Do you understand how this works?

Grima04 commented 4 years ago

@artdeell Thanks for your information about GL4ES and Regal. I was also wondering what @FrankOu2001 wanted to say with that reply. GL4ES only needs OpenGL ES 2.0 to wrap up to OpenGL 2.1 (according to what ptitSeb has written in his GL4ES project readme) and my phone supports up to OpenGL ES 3.2, so my phone GPU drivers should be perfectly fine to use the GL4ES wrapper which should be the libGL.so.1 library contained in the runtime pack. But back to the topic, I read on the GL4ES GitHub page that shaders are in a poor state but I thought that it would still be enough to get some basic MC shaders working. Hopefully ptitSeb will be able to add shaders support to GL4ES in the future. I also tried to compile Regal but I cannot get it to compile properly for Android yet, I am still getting some errors. I wonder if Zink could also be used in this case. As far as I know it is a OpenGL to Vulkan wrapper and since Android has Vulkan support it might work aswell. As far as the shader packs are concerned, I tried to use some which are compatible with Mac OS (and therefore only need OpenGL 2.1 and the corresponding GLSL 1.20 version I think) like SFLP, Chocapic13 lite and Sildurs Vibrant Lite shaders.

FrankOu2001 commented 4 years ago

@artdeell I misunderstood something and I have deleted the request

artdeell commented 4 years ago

@artdeell Thanks for your information about GL4ES and Regal. I was also wondering what @FrankOu2001 wanted to say with that reply. GL4ES only needs OpenGL ES 2.0 to wrap up to OpenGL 2.1 (according to what ptitSeb has written in his GL4ES project readme) and my phone supports up to OpenGL ES 3.2, so my phone GPU drivers should be perfectly fine to use the GL4ES wrapper which should be the libGL.so.1 library contained in the runtime pack. But back to the topic, I read on the GL4ES GitHub page that shaders are in a poor state but I thought that it would still be enough to get some basic MC shaders working. Hopefully ptitSeb will be able to add shaders support to GL4ES in the future. I also tried to compile Regal but I cannot get it to compile properly for Android yet, I am still getting some errors. I wonder if Zink could also be used in this case. As far as I know it is a OpenGL to Vulkan wrapper and since Android has Vulkan support it might work aswell. As far as the shader packs are concerned, I tried to use some which are compatible with Mac OS (and therefore only need OpenGL 2.1 and the corresponding GLSL 1.20 version I think) like SFLP, Chocapic13 lite and Sildurs Vibrant Lite shaders.

You need to modify some GL4ES sources to support glsloptimizer. Don't use Regal, since it's a huge pain to configure it for Minecraft, and it's clearly impossible with ES2 profile, because Regal doesn't support GL display lists under ES2 profile. (I built Regal myself for PojavLauncher, and i can claim such thing) Zink is not-as-good either, since Minecraft uses pretty old features from OpenGL 1.1 and 2.0, which Zink doesn't implement.

artdeell commented 4 years ago

I tried the lowest-spec shaders for OpenGL 2.0, and debug output claims that current shader translation issues are still relevant. Hope that glsloptimizer will fix them.

Matryx0207w commented 4 years ago

Hola hablando sobre eso es raro ya q en el optifine y el juego dice open gl 2.1 ya q mi dispositivo tiene open gl 3.1 no se si necesitan arreglar eso ya q asi sale y por eso no podemos usar esos shaders deben arreglarlo

Matryx0207w commented 4 years ago

Screenshot_20200701-073736_MCinaBox Screenshot_20200701-073831_CPU-Z

Grima04 commented 4 years ago

Hola hablando sobre eso es raro ya q en el optifine y el juego dice open gl 2.1 ya q mi dispositivo tiene open gl 3.1 no se si necesitan arreglar eso ya q asi sale y por eso no podemos usar esos shaders deben arreglarlo

Hola, la versión de OpenGL ES soportada por la carta gráfica del móvil no tiene nada que ver con la versión de OpenGL reportada por OptiFine en Minecraft. El problema principal es que Minecraft necesita OpenGL (el OpenGL de los ordenadores) que no es el mismo que el OpenGL ES soportado por los móviles Android. Por eso se necesita un traductor para convertir las instrucciones de OpenGL de Minecraft en instrucciones de OpenGL ES que la carta gráfica del Android puede entender, en este caso GL4ES. El problema con GL4ES es que al momento la traducción de las instrucciones de los shaders no son soportadas suficientemente bien para que los shaderpacks funcionen. Tal vez van a mejorar el soporte en el futuro pero al momento no se puede jugar en MCinaBox con shaders.

P. S. Me imagino que tenemos que continuar la conversación en inglés, porque eso es el estándar en proyectos open source y utilizar Google Translate no es siempre lo óptimo para otros que no entienden un cierto idioma.

Matryx0207w commented 4 years ago

ok thanks for the data in the end I thought that due to the limitation of open gl 2.0 it gave me a serious delay problem and caused limitations in my device, but thanks to what I said I suppose it would be better to be patient and see if in the future this It is no longer so limiting, I hope you no longer have optimization problems with the apk as there are some of lag :)

KUALALUM commented 4 years ago

What shader is that

KUALALUM commented 4 years ago

Hello, I wanted to ask if it would be possible to integrate a newer version of GL4ES into the runtime pack of MCinaBox to get support for OpenGL 2.1 and thus also for low spec Minecraft shaders which use OpenGL 2.1. At the moment the GL4ES wrapper version used seems to wrap only up to OpenGL 2.0, at least that is what is being reported by Optifine. Below is a screenshot of what currently happens when I try to load a shader pack (the landscape might look a bit strange since I was using the Aether II mod for 1.7.10 with Forge):

Screenshot_20200611-150100

What shader is it i want to try

infinite9898 commented 3 years ago

How to install Zink in this like pojav launcher

CosineMath commented 3 years ago

How to install Zink in this like pojav launcher

Have a look on Mesa for Android

SrPeep123 commented 2 years ago

Olá, eu queria perguntar se seria possível integrar uma versão mais recente do GL4ES no runtime pack do MCinaBox para obter suporte para OpenGL 2.1 e, portanto, também para shaders Minecraft de baixa especificação que usam OpenGL 2.1. No momento, a versão do wrapper GL4ES usada parece envolver apenas o OpenGL 2.0, pelo menos é o que está sendo relatado pelo Optifine. Abaixo está uma captura de tela do que acontece atualmente quando tento carregar um pacote de shaders (a paisagem pode parecer um pouco estranha, já que eu estava usando o mod Aether II para 1.7.10 com Forge):

![Captura de tela_20200611-150100](https://user-images.githubusercontent.com/22496380/84388931-a8781280-abf5-11ea-8888-3e6d93e496fc.o OpenGl do Mcnabox????

Como eu mudo o Gl4s do Mcnabox