Wabbitseason Wabbitseason - 1 year ago 97
iOS Question

GLSL transparency issue only on iOS

I have a quite simple shader in my LibGDX application which is working perfectly on Windows 10, MacOS and on various Android devices, but everything is black on iOS (tested with two devices).

Is there a common "gotcha" which could explain this?


I had to add the following at the top my fragment shader:

#ifdef GL_ES
precision mediump float;

Now it's working everywhere.

Answer Source

If you or library doesn't check error returns it is common to get black screen without any visible reason because rendering context is silently failing. There is multiple reason that something might fail. Those mostly are caused by driver not supporting features that you are depending on. (features from newer GL version or unsupported extension) Other common case is partially missing rendering.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download