GLES2 Cubemap can't use min filter GL_LINEAR_MIPMAP_LINEAR

Hi there,


I can't seem able to use the GL_LINEAR_MIPMAP_LINEAR on GLES2.0


In my engine, I have the same cubemap class working and tested under all desktop platforms and I was testing it now under iOS with GLES2.


It doesn't seem to like the following:

glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);


If I do the following instead:

glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_FILTER, GL_LINEAR);


It works on iOS but then I can't use cubemap mips for PBR rendering.


Is this meant to work? What I find confusing is that if it's not supported, why would Apple add support for the textureCubeLodEXT() function in GLSL ?


I must be missing something, is it declared for iOS under another GL macro?


Cheers

I should have mentioned that I tried building this against OpenGLES 3.0 and it does work as expected.


Is there anything required to get it to work on GLES2 ?


Just that I'm going to be running this in an existing GLES2.0 app and as far as I know the requirements for apps can't be bumped up once they've been released. To me this is a bit silly considering that it should be justifiable that an app would "require" newer devices, in one of the updates 5 years after it was originally released, specially if users can get access to earlier versions, which I think that it has been possible for a while now or that's what iTunes Connect seems to suggest.


Branching GLES3 and GLES2 backends is trivial in this case (just avoid doing the mip call and everything works) but this isn't always the case, specially when you're simulating GLSL3+'s flat in GLES2 keyword by duplicating tons of vertices with it's additional bookkeeping requirements... sorry for the rant.

Hey,


I am trying to handle similar issues right now, but unfortunatelly in my case, the MIP FILTERING is completely broken when enabled. Crazy strange noise shimerrng is presented and it's really unstable. The lower mip I use, the worse it is.

I've tried many different formats, many paranoic scenarios, just for the case that there's some specific combination as a driver bug, what I've been using but I can't still solve it. I would really like to cooperate here, at least in those terms that we can have some opened discussion here. As far as I can see, there are not so many people around, who are messing up directly with the IOS rendering nowadays, as everyone is switching to Unity or UE4. This leads to the fact, that it's really hard the simple sample which would be working and compare with what should work. I am porting quite complex engine, with many features, and everything went smoothly till now. If you would have a second, just stop by and I would be really gratefull I fully understand that I am no helping to solve your problem, but at least, since you are doing in similar fashion, we can help each other time to time and share some experience. As you can see, I am not posting code, because there's no real sense in it, I more want to know what specifically and on what devices are you running with this filtering, that it works to you.


Thanks a lot for your time!

Cheers

GLES2 Cubemap can't use min filter GL_LINEAR_MIPMAP_LINEAR
 
 
Q