# SSAO artefacts on iPhone (OpenGL ES)

I've never written shaders before, and now I'm trying to implement SSAO with SceneKit on OS X and iOS. I'm trying different SSAO shaders that I find, e.g. from Three.js, this one, and this one.

On OS X they all work as they should, but on iPhone all of them giving me the same artefacts (images show SSAO pass only). The lines move when I move the camera. So it must be because of some differences of OpenGL ES. Anyone knows what's wrong?

Resolved by adding precision highp sampler2D to my shaders.

• Out of curiosity, what was the precision before? Low or Medium? – Simon F Mar 9 '16 at 9:33
• I found a document saying it's low for samplers and high for float/int by default on ES. Oh, ints depend on shader type I've added link to my answer. – pronvit Mar 9 '16 at 21:16
• OK. Was just wondering if you'd tried mediump as there could be performance (and power) benefits. – Simon F Mar 10 '16 at 12:30
• mediump doesn't help in my case, and also I don't notice any significant performance difference either. – pronvit Mar 14 '16 at 21:22