Shaders (Pojavlauncher Shaders development) only support one framebuffer
Shaders only support gl_FragData[0] to pass info to post-process (composite and final files). We need more than this for make basically all effects (even the most basic like torchlight need pass the lightmap using the gl_FragData[1]) and other like: Direct light (need pass normals using gl_FragData[2]), specular, Screen Space Reflections, SSAO,
ex: gl_FragData[1] gl_FragData[2] gl_FragData[3] gl_FragData[4]

I made bloom, but I can't apply this to the image because we have only the gl_FragData[0] avaible to use.
sorry for my bad english.
Any news pttitseb?a way to help us to use shaders on minecraft java for android(pojavlauncher )?
Not yet. I haven't checked that. The multiple FragData is not supported on default gles2, it needs an extension, but I suppose the extension needs to be activated in the shader. But again, I haven't checked yet.
So we're still waiting for GLES 3.0, 3.1 or even 3.2 to have a huge speed boost. And more things.
Not yet. I haven't checked that. The multiple FragData is not supported on default gles2, it needs an extension, but I suppose the extension needs to be activated in the shader. But again, I haven't checked yet.
I hope we can receive this update soon for make shaders. Also I find another error, we can't use alpha channel of colored shadows sampler.
I closed this by accident, I'm learning how use github sorry.
@ptitSeb So, seems like this extension is in core of OpenGL ES 3... And that's why it's not listed on most devices. Maybe add a check for it? Or an env var that the user can set?
So, seems like this extension is in core of OpenGL ES 3...
GL_EXT_draw_buffers are for ES2 and supported by default in ES3 (not under extension type),so I added some checks to ignore checking GL_EXT_draw_buffers if LIBGL_ES=3
diff --git a/src/glx/hardext.c b/src/glx/hardext.c
index 34eb767..5b763e6 100644
--- a/src/glx/hardext.c
+++ b/src/glx/hardext.c
@@ -257,6 +257,10 @@ void GetHardwareExtensions(int notest)
}
S("GL_EXT_blend_minmax ", blendminmax, 1);
S("GL_EXT_draw_buffers ", drawbuffers, 1);
+ if (hardext.esversion == 3) {
+ SHUT_LOGD("Extension GL_EXT_draw_buffers is in core ES3, and so used\n");
+ hardext.drawbuffers = 1;
+ }
/*if(hardext.blendcolor==0) {
// try by just loading the function
LOAD_GLES_OR_OES(glBlendColor);
I'm unsure if it works...
gl4es doesn't support ES3 yet. As I wrote before, the issue is in a shader, the extension probably need to be declared in shader header in ES2 (but not in ES3 probably).
gl4es doesn't support ES3 yet.
But gl4es supports GLSL ES 300+ right?
So, he can use gl_FragData[n] without #extension enable...
(EDIT: the one he tested is from ES2 context)
So, according to this https://github.com/ptitSeb/gl4es/issues/268#issuecomment-762309029 and enabled LIBGL_DBGSHADERCONV, the converted is always #version 100. Maybe another patch that will detect GLES3 context and use GLSL ES 3.x :eyes:
But I’m wondering why? While GL4ES prints
LIBGL: GLSL 3xx es supported and used
but only GLSL 1.00 is being used.
@ptitSeb please don’t ignore this.
https://github.com/ptitSeb/gl4es/blob/b1928320bd353f10d92718965c0f885edb132b31/src/gl/shaderconv.c#L495
This check is never true, since versionString is always NULL or empty, even #version 120 is defined.
Also, https://github.com/ptitSeb/gl4es/blob/b1928320bd353f10d92718965c0f885edb132b31/src/gl/shaderconv.c#L288-L289 GLSL version code stick with es, this will cause compile error (but I haven’t seen any report because 1st check is always false).
@kvazar-git shut up
@kvazar-git shut up
Emm...?
@ptitSeb please don’t ignore this.
https://github.com/ptitSeb/gl4es/blob/b1928320bd353f10d92718965c0f885edb132b31/src/gl/shaderconv.c#L495
This check is never true, since
versionStringis alwaysNULLor empty, even#version 120is defined.
Is it? That's strange. I need to debug this. "preproc" is supposed to fill in this one.
Also, https://github.com/ptitSeb/gl4es/blob/b1928320bd353f10d92718965c0f885edb132b31/src/gl/shaderconv.c#L288-L289
GLSL version code stick with es, this will cause compile error (but I haven’t seen any report because 1st check is always false).
Correct. I'll fix that when I found the empty "versionString" issue.
ok @khanhduytran0 the version detection should be fixed, and using higher GLSL version number should work now. That may help a few issue.
Shaders only support gl_FragData[0] to pass info to post-process (composite and final files). We need more than this for make basically all effects (even the most basic like torchlight need pass the lightmap using the gl_FragData[1]) and other like: Direct light (need pass normals using gl_FragData[2]), specular, Screen Space Reflections, SSAO,
ex: gl_FragData[1] gl_FragData[2] gl_FragData[3] gl_FragData[4]
I made bloom, but I can't apply this to the image because we have only the gl_FragData[0] avaible to use.
sorry for my bad english.
Link to the shaders
So, seems like this extension is in core of OpenGL ES 3...
GL_EXT_draw_buffersare for ES2 and supported by default in ES3 (not under extension type),so I added some checks to ignore checkingGL_EXT_draw_buffersifLIBGL_ES=3diff --git a/src/glx/hardext.c b/src/glx/hardext.c index 34eb767..5b763e6 100644 --- a/src/glx/hardext.c +++ b/src/glx/hardext.c @@ -257,6 +257,10 @@ void GetHardwareExtensions(int notest) } S("GL_EXT_blend_minmax ", blendminmax, 1); S("GL_EXT_draw_buffers ", drawbuffers, 1); + if (hardext.esversion == 3) { + SHUT_LOGD("Extension GL_EXT_draw_buffers is in core ES3, and so used\n"); + hardext.drawbuffers = 1; + } /*if(hardext.blendcolor==0) { // try by just loading the function LOAD_GLES_OR_OES(glBlendColor);I'm unsure if it works...
I works, but ES3.0 context is not supported in gl4es yet. so hardext.esversion is never more than 2 for now.
Mhm so u all are talking about shaders can i be a part of this conversation
I saw that you’ve reverted it :( actually gl_FragData is not easy to emulate to layout qualifiers?
It should be fairly easy, but still, it's not automatique and need some adaptations in shaderconv.