I had originally posted this in ‘Unity Support’ but as it seems to be a shader issue, I thought I’d post it here.
I’m almost finished a quick game and I am pleased for the most part, but a problem has emerged. The game looks fine on my Macbook Pro and G5 tower but, when I tested it on my wife’s iBook, the screen was black.
I tried the iBook on a scene with and without the Image Effect enabaled and the one with the effect produced the black screen. I looked at the code for the shader, Contrast Stretch, and at the beginning I found this line.
// TBD: if some shader is not supported, turn off!
I interpret this to mean that someone planned to add some code here that would detect whether the shader would run on the computer but as it’s a comment and there is no code after it, the code was never added.
I found the following code on a script called ‘ImageEffectBase’ and it seems to deal with turning the effect off if it isn’t supported.
public Shader shader;
protected void Start ()
{
// Disable if we don't support image effects
if (!SystemInfo.supportsImageEffects) {
enabled = false;
return;
}
// Disable the image effect if the shader can't
// run on the users graphics card
if (!shader.isSupported)
enabled = false;
}
Can I just add it to the beginning of the ‘Contrast Stretch’ script?