Odd shader result on select Android devices?

This is a shader I use for self illuminated, alpha-blended “sprites”, such as the characters in my most recent iOS game “Battleheart”. It’s a pretty bare-bones shader, the only funky thing being bolded below. It allows me to have 25% gray be my “default” tone rather than white, so that I can use the tint color to brighten or darken the image (for highlighting selected characters and such).

Shader "My Shaders/AlphaSelfIllum" { 
    Properties { 
        _Color ("Tint", Color) = (0.25,0.25,0.25,1) 
        _MainTex ("Color (RGB) Alpha (A)", 2D) = "white" {} 
    } 
    SubShader { 
        Tags {"Queue"="Transparent"} 
        Pass { 
            ZWrite Off 
            Blend SrcAlpha OneMinusSrcAlpha 
            SetTexture [_MainTex] { 
                constantColor [_Color] 
                [B]combine texture * constant quad, texture * constant[/B] 
            } 
        } 
    } 
}

It works great, except for one problem… I’ve gotten a couple reports from players on Android that the characters in game are dim… which could only be explained by this shader not behaving as expected on certain hardware. Is there any way that drivers or devices could differ in a way that would cause the above to not result in 25% gray, a.k.a. Color(0.25,0.25,0.25), to not result in the base texture coming through unaltered?

On Android there are various major differences between the gpus. For example they are not tile based, there are devices with reference drivers in the play and others with really opted and implemented ones, then there are devices with OpenGL ES 1.0 devices (something that never existed on iOS at all), depending on what unity requires to start and checks at start even devices that have no hw at all.

Best you would try to find out what hardware they have to be able to nail it better, generally things shouldn’t cause problems, but this “shouldn’t” is as binding and correct in reality as it is on the desktop as android is no dime better than the desktop when it comes to this kind of dead annoying problems.

I restricted to OpenGL ES 2.0 and armv7 on deployment, so at least that sorta narrows it down. One of these reports comes from a modded galaxy S (something the guy referred to as CyanogenMod) and the other is a Droid 1 that’s been rooted and has a non-factory ROM. I’m gonna go out on a limb and say this one is not my problem. :slight_smile:

Cyanogen is a rooted device too. Cyanogen is a highly modified version of the rom, though normally I thought they were for HTC devices, so you can basically assume that this one isn’t one of your problems either but the consequence of using drivers and operating system not officially targeted for his handset.

good thing that HTC has been locking down bootloaders since last summer on the new devices so future htc devices at least won’t cause any headache due to rooting anymore. (I sit myself on an unrooted original HTC Desire)

Dreamora have you heard of the Self-illum shaders from Unity showing as a black texture on some Android devices? I’m using these shaders in a live wallpaper and some devices are having issues.

Also experiencing a similar issue on a Galaxy S3.