Shadows and post processor filters issues and proposals

Hi @nehon,

I just tested it. The extension directive error is solved with your patch. About the Shadows.glsllib patch, you changed it in the “VERSION >= 130” section instead of the other section in which I changed it. So it’s still failing with the same exception.

Although it’s easy, here is the patch in case you want to apply it directly:

--- Shadows.glsllib     2018-05-23 11:57:10.006948194 +0200
+++ jme3-core/src/main/resources/Common/ShaderLib/Shadows.glsllib       2018-05-23 10:32:59.480822119 +0200
@@ -31,7 +31,10 @@
     #endif
 #else
     #define IVEC2 vec2
-    #ifdef HARDWARE_SHADOWS
+    #if defined GL_ES
+        #define SHADOWMAP sampler2D
+        #define SHADOWCOMPARE(tex,coord) step(coord.z, texture2DProj(tex, coord).r)
+    #elif defined HARDWARE_SHADOWS
         #define SHADOWMAP sampler2DShadow
         #define SHADOWCOMPARE(tex,coord) shadow2DProj(tex, coord).r
     #else

I think that this behaviour is weird because both my devices have GLSL higher releases than 1.30 but the shader detects it to lower… According to GLView, my specs are:

  • Samsung galaxy S6 with openGL ES 3.2 with GLSL ES 3.20
  • Xiaomi redmi 3s with openGL ES 3.0 with GLSL ES 3.00

Maybe is jme3 overwritting it to just use basic openGL ES 2.0 and shader level 1.00?

Additionally, for android devices extension GL_EXT_gpu_shader5 or GL_OES_gpu_shader5 (both supported in SGS6 and probably most more modern devices) could be used instead of GL_ARB_gpu_shader5. I’m just asking, I don’t know the differences between them.

Thanks