Hi, I asked this question on the iPhone game board but got no replies so I figured I’d ask here. I was wondering if anyone could help me solve my problem getting the XRay shader to work on iOS. Here’s the code for it.
http://www.unifycommunity.com/wiki/index.php?title=XRay
When I run it in Emulation OpenGL ES2.0 mode inside Unity, it renders fine, but turns purple on the Phone itself or in emulation OpenGL ES1.1 mode.

My phone is a 3GS and it’s compiling in ARM7 mode. #define USE_OPENGLES20_IF_AVAILABLE 1
Is there any reason this Shader shouldn’t work? If so, is there any alternative?
Thanks!
That it does not work on ES 1.1 is to expect (as such it won’t work on pre 3GS devices either) cause the shader is pure programmable pipeline and as such ES 1.1 incompatible.
That it freaks out though makes less sense, but what I see is that it uses fog, which isn’t a that good idea. Unsure if this at worst could impact the rendering on the device in such a way (its known that fog can indead cause headache with ES 2.0 targeting)
Yeah I saw that about the fog. Is there any alternative way to accomplish what this shader does? because it doesn’t seem that complex.
Also is there a way to make sure that I’m running ES 2.0 on my phone? Once again it works fine in 2.0 emulation but not running on my 3GS