SetTexture combine mode QUAD modifer works different on iPhone/iPad

According to ShaderLab:Texturing document, there are some modifiers available on combining.(such as DOUBLE and QUAD) I have been writing little shader for iOS devices and found out that DOUBLE modifier and QUAD modifier does the same when they work as expected on my Mac. Is this an expected behavior(limitation) on iOS devices, or am I missing something here?


Shader code around texture

SetTexture [_MyOccTex] {
    constantColor [_MyLORatio]
}
SetTexture [_MainTex] {
    combine texture * previous QUAD, texture
}


Result:

Mac

Shader test image on Mac

iPhone4

Shader test image on iPhone4

1 Answer

1

It's a bug, but only under fixed function emulation in OpenGL ES 2.0. As such, you can get around it with a programmable shader, or by using OpenGL ES 1.1.

If you need me to write you a GLSL version, then please post the full shader. (What you have above is certainly not what you want, because you're not using _MyOccTex at all.)