Shaders falling back on Galaxy S 3

Has anyone had mobile shader problems with the Galaxy S 3? I tested my game (Zombonic) on a HTC Incredible S and a Galaxy S 2. The shaders work fine on both devices, but someone I know downloaded the game on Galaxy S 3 and it is falling back to vertex shading. The shaders that are failing are basically modified versions of the mobile bump and mobile bump spec shaders where I have removed the requirement for a directional light (you can use any light). I have also added emissive support to one of these shaders.

I don’t have my project at hand right now, so I can’t supply any further details, but I’m wondering if anyone else has had shader problems with Galaxy S 3. Considering this is a top of the line Android, I’m very surprised that it is not handling these shaders.

So these are the shaders that seem to be making Galaxy S3 spit the dummy. Any reason why these would work on the S2 and my 18 month old Incredible S, but not the more advanced Galaxy S3?

Shader "Mobile/Bump Specular Emissive Colour" {
Properties {
	_Shininess ("Shininess", Range (0.03, 1)) = 0.078125
	_MainTex ("Base (RGB) Gloss (A)", 2D) = "white" {}
	_BumpMap ("Normalmap", 2D) = "bump" {}
	_Emissive("Emissive", 2D) = "black" {}
	_EmissiveColor("_EmissiveColor", Color) = (1,1,1,1)
	_EmissiveIntensity("_EmissiveIntensity", Range(0,10) ) = 0.5
}
SubShader { 
	Tags { "RenderType"="Opaque" }
	LOD 250
	
CGPROGRAM
#pragma surface surf MobileBlinnPhong exclude_path:prepass nolightmap halfasview

inline fixed4 LightingMobileBlinnPhong (SurfaceOutput s, fixed3 lightDir, fixed3 halfDir, fixed atten)
{
	fixed diff = max (0, dot (s.Normal, lightDir));
	fixed nh = max (0, dot (s.Normal, halfDir));
	fixed spec = pow (nh, s.Specular*128) * s.Gloss;
	
	fixed4 c;
	c.rgb = (s.Albedo * _LightColor0.rgb * diff + _LightColor0.rgb * spec) * (atten*2);
	c.a = 0.0;
	return c;
}

sampler2D _MainTex;
sampler2D _BumpMap;
half _Shininess;
sampler2D _Emissive;
float4 _EmissiveColor;
float _EmissiveIntensity;

struct Input {
	float2 uv_MainTex;
	float2 uv_Emissive;
};

void surf (Input IN, inout SurfaceOutput o) {
	fixed4 tex = tex2D(_MainTex, IN.uv_MainTex);
	o.Albedo = tex.rgb;
	o.Gloss = tex.a;
	o.Alpha = tex.a;
	o.Specular = _Shininess;
	o.Normal = UnpackNormal (tex2D(_BumpMap, IN.uv_MainTex));
	
	float4 Tex2D1=tex2D(_Emissive,(IN.uv_Emissive.xyxy).xy);
	float4 Multiply0=Tex2D1 * _EmissiveColor;
	float4 Multiply2=Multiply0 * _EmissiveIntensity.xxxx;
	
	o.Emission = Multiply2;
}
ENDCG
}

FallBack "Mobile/VertexLit"
}
Shader "Mobile/Bump All Lights" {
Properties {
	_MainTex ("Base (RGB)", 2D) = "white" {}
	_BumpMap ("Normalmap", 2D) = "bump" {}
}

SubShader {
	Tags { "RenderType"="Opaque" }
	LOD 250

CGPROGRAM
#pragma surface surf Lambert

sampler2D _MainTex;
sampler2D _BumpMap;

struct Input {
	float2 uv_MainTex;
};

void surf (Input IN, inout SurfaceOutput o) {
	fixed4 c = tex2D(_MainTex, IN.uv_MainTex);
	o.Albedo = c.rgb;
	o.Alpha = c.a;
	o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_MainTex));
}
ENDCG  
}

FallBack "Mobile/Diffuse"
}

Well, the s3 still uses the mali400 gpu. Samsung decided to contaminate the whole android universe with this tegra2-like chip. It’s fast but lacks precision in the pixel fragment shader part. They admited this in the arm-mali forum. (I had lost some time to see that the chip does not support the sincos function in the vertex fragment.)

Perhaps ask a question also here: http://forums.arm.com/index.php?/forum/10-mali-forums/

It could be a driver problem since I already saw 1-2 posts with complains about the s3 drivers.

I thought they were gonna dump the mali400 for s3 … Hrmph … Perhaps Apple is paying them to continue using this crap of a gpu …

Turns out this has nothing to do with hardware; it is actually a problem with Android versions. The same issue will occur on Galaxy S2 after upgrading to Android 4.0.4. I have another Galaxy S2 running Android 2.3.6 and the shaders render just fine on it.

So the question is: how do I get this fixed?

Is there something that I need to change in the shaders to handle the later versions of Android, or does Unity Team need to fix something in the engine to make it compatible?

Hmm… that sucks!

Better file a bug report to unity team so they can look at it.

If it is a driver problem I suppose they can contact samsung or google to fix it (?)

Submitted, fingers crossed!

Have you included a sample project? My experience with bug reporting is that if you don’t include a sample project that reproduces the problem, the bug report will mainly be overlooked.

I wasn’t aware of that. Anyway, the issue seems to have been fixed in Unity 4.