GL_EXT_shader_texture_lod not supported

Problems building or running the engine, queries about how to use features etc.
Post Reply
Slicky
Bronze Sponsor
Bronze Sponsor
Posts: 614
Joined: Mon Apr 14, 2003 11:48 pm
Location: Was LA now France
x 25

GL_EXT_shader_texture_lod not supported

Post by Slicky »

Ogre Version: :1.12.9:
Operating System: :Windows building for Android:
Render System: :GLES2:

My ARM64 version works but my ARM7 does not and I finally caught this in the logcat:

Code: Select all

'pbr-frag.glsl' 0:9: P0003: Warning: Extension 'GL_EXT_shader_texture_lod' not supported
The exception is:

Code: Select all

ERR_INVALIDPARAMS
Could this be the crash and isn't there a fallback? I have registered with RTSS which I thought was a fallback.
paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Re: GL_EXT_shader_texture_lod not supported

Post by paroj »

Slicky wrote: Tue Aug 17, 2021 8:59 am My ARM64 version works but my ARM7 does not and I finally caught this in the logcat:

Code: Select all

'pbr-frag.glsl' 0:9: P0003: Warning: Extension 'GL_EXT_shader_texture_lod' not supported
This is merely a warning for that line:
https://github.com/OGRECave/ogre/blob/7 ... ag.glsl#L9

you should be able to ignore it as the extension is not actually used with GLES:
https://github.com/OGRECave/ogre/blob/7 ... rogram#L17

If you have an Intel or Nvidia GPU, you should be able to run the GLES2 RenderSystem on Windows as well. Maybe you can reproduce the problem on Desktop for easier debugging?
Slicky wrote: Tue Aug 17, 2021 8:59 am The exception is:

Code: Select all

ERR_INVALIDPARAMS
Could this be the crash and isn't there a fallback? I have registered with RTSS which I thought was a fallback.
An unhandled exceptions terminates the app, so probably yes. However, we would need the stack-trace or at least the error message containing the source location to investigate this.

The RTSS technique is not actually configured as a fallback. I rather meant that you can use it in case you dont want to ship extra shaders.

It would not help with the problem at hand anyway as Ogre thinks it can use the glTF shaders, but something goes wrong when it actually tries to do so.
Slicky
Bronze Sponsor
Bronze Sponsor
Posts: 614
Joined: Mon Apr 14, 2003 11:48 pm
Location: Was LA now France
x 25

Re: GL_EXT_shader_texture_lod not supported

Post by Slicky »

I eventually found it. In pbr.program I had disabled a few things:

Code: Select all

fragment_program glTF2/PBR_fs_glsl glsl
{
	source pbr-frag.glsl
    preprocessor_defines MANUAL_SRGB,SRGB_FAST_APPROXIMATION,HAS_NORMALS,HAS_TANGENTS,HAS_BASECOLORMAP,HAS_NORMALMAP,HAS_EMISSIVEMAP,HAS_METALROUGHNESSMAP
}
// ,USE_TEX_LOD,HAS_OCCLUSIONMAP,USE_IBL,
but in the PBR_material there were sampler settings that didn't exist so I commented them out.

Code: Select all

      // GL sampler settings
                param_named      u_BaseColorSampler   int 0
                param_named      u_NormalSampler      int 1
                param_named      u_EmissiveSampler    int 2
                param_named      u_MetallicRoughnessSampler int 3
//                param_named      u_OcclusionSampler   int 4
//                param_named      u_DiffuseEnvSampler  int 5
//                param_named      u_SpecularEnvSampler int 6
//                param_named      u_brdfLUT            int 7
Is there a way to do an #ifdef in the materal file to make it cleaner so that it would run and work no matter what?
paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Re: GL_EXT_shader_texture_lod not supported

Post by paroj »

Slicky wrote: Tue Aug 17, 2021 12:57 pm I eventually found it. In pbr.program I had disabled a few things:

Code: Select all

fragment_program glTF2/PBR_fs_glsl glsl
{
	source pbr-frag.glsl
    preprocessor_defines MANUAL_SRGB,SRGB_FAST_APPROXIMATION,HAS_NORMALS,HAS_TANGENTS,HAS_BASECOLORMAP,HAS_NORMALMAP,HAS_EMISSIVEMAP,HAS_METALROUGHNESSMAP
}
// ,USE_TEX_LOD,HAS_OCCLUSIONMAP,USE_IBL,
but in the PBR_material there were sampler settings that didn't exist so I commented them out.

Code: Select all

      // GL sampler settings
                param_named      u_BaseColorSampler   int 0
                param_named      u_NormalSampler      int 1
                param_named      u_EmissiveSampler    int 2
                param_named      u_MetallicRoughnessSampler int 3
//                param_named      u_OcclusionSampler   int 4
//                param_named      u_DiffuseEnvSampler  int 5
//                param_named      u_SpecularEnvSampler int 6
//                param_named      u_brdfLUT            int 7
Is there a way to do an #ifdef in the materal file to make it cleaner so that it would run and work no matter what?
you mean something like

Code: Select all

               preprocessor_defines MANUAL_SRGB
               #ifdef MANUAL_SRGB
                param_named      u_BaseColorSampler   int 0
                #else
                param_named      u_NormalSampler      int 1
                #endif
no. You have to define a different "fragment_program" for that.

There is also https://ogrecave.github.io/ogre/api/lat ... 93bd2314d9

However, it is not wired-up with the material scripts yet.
Slicky
Bronze Sponsor
Bronze Sponsor
Posts: 614
Joined: Mon Apr 14, 2003 11:48 pm
Location: Was LA now France
x 25

Re: GL_EXT_shader_texture_lod not supported

Post by Slicky »

Yes my thought was something like that. Then I wouldn't have to comment out parts of the material script and in my case it took me forever to find it. I ending up re-enabling some of your logging output in Ogre source and script parsing to see what was going wrong.
Post Reply