Shader turns black on iOS build.

Hi there,
I’m having a bit of an issue where one of my shaders seems to turn out black when i build it to the device.
Any ideas as to what might be causing this? Here’s the shader.

Shader "Pete/Solid Transparent Color" {
Properties {
	_Color ("Solid Color (A = Opacity)", Color) = (0,0,0,1)	
}

Subshader {
	Tags {Queue = Transparent}
	ZWrite on
	Blend SrcAlpha OneMinusSrcAlpha 
	
	Color [_Color]	
	Pass {}
	}
}

Thanks
Pete

Shouldn’t most of the commands be inside the Pass structure? I.e.:

Shader "Pete/Solid Transparent Color" {
Properties {
	_Color ("Solid Color (A = Opacity)", Color) = (0,0,0,1)	
}

Subshader {
	Tags {Queue = Transparent}
	
	Pass {
		ZWrite on
		Blend SrcAlpha OneMinusSrcAlpha 

		Color [_Color]	
	}	
}
}

Hey Thanks Martin,

That does look pretty wrong now that I look at it :slight_smile: , I changed though it and it still appears black in the build.
I’m now thinking it might be something to do with the trail render it is applied to.

Pete

Hehe, looks like past me is helping present me :slight_smile:
http://forum.unity3d.com/threads/81307-Trail-render-turning-out-black-on-iPhone-build.
Solved…