Transparent/Diffuse-shader always transparent by default (alpha)?

I’m currently learning Unity and I’ve had some problems with the Transparent/Diffuse-shader. I made a script that, using iTween, fades objects when you go behind them and for that I needed a shader that supports transparency.

This one was recommended, but when I apply it to my test-objects they act like the alpha is set to a low amount, even though it isn’t mentioned anywhere in the script or settings (most of the objects aren’t even related to the script, they just share the same texture which is one of Unity’s default ones). If I use the normal diffuse-shader there aren’t any problems, but I can’t use the script either (due to the lack of transparency).

How can I make the objects stay at 255 alpha by default, or alternatively, how can I change all the affected objects at startup? I’ve already tried with one and got it to work, but that would require scripts for all the similar objects which seems pretty unnecessary.

alt text

First question and post here btw, so hi me!

I downloaded the source for the built-in shaders some time ago, and can reveal that Transparent/Diffuse is implemented like so:

Shader "Transparent/Diffuse" {
Properties {
	_Color ("Main Color", Color) = (1,1,1,1)
	_MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}

SubShader {
	Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}
	LOD 200

#pragma surface surf Lambert alpha

sampler2D _MainTex;
fixed4 _Color;

struct Input {
	float2 uv_MainTex;

void surf (Input IN, inout SurfaceOutput o) {
	fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;
	o.Albedo = c.rgb;
	o.Alpha = c.a;

Fallback "Transparent/VertexLit"

As you can see, the color that ends up getting written is the product of the color you select in the editor, and the color that gets read from the texture. They get multiplied together:

fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;
o.Albedo = c.rgb;
o.Alpha = c.a;

I can see in your screenshot that your _Color variable is all white and alpha 1. (It would have a partially black bar underneath if you had its alpha lowered). So the texture color alone is actually displayed, because it gets multiplied with (1,1,1,1) in the shader. Therefore, the only other option, as @Loius suggested, is that your texture has alpha values below 1 in its pixels. It is the only other place an alpha value < 1 could possibly come from.

Open your texture in a bitmap editor (Photoshop, GIMP, Paint(dot)Net) and examine its alpha channel.