Hello,
I’m currently working on a school project and I need to be able to fade in/out an object. The only problem is that when I use the normal transparent/diffuse shader and the beast lightmapper that I get some strange problems… Does anyone have any idea how to fix this?
Many thanks already!
Crash-Konijn
Try this one).
Shader "Transparent/DiffuseForComplexGeometry" {
Properties {
_Color ("Main Color", Color) = (1,1,1,1)
_MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}
}
SubShader {
Pass {Colormask 0}
Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}
LOD 200
CGPROGRAM
#pragma surface surf Lambert alpha
sampler2D _MainTex;
float4 _Color;
struct Input {
float2 uv_MainTex;
};
void surf (Input IN, inout SurfaceOutput o) {
half4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;
o.Albedo = c.rgb;
o.Alpha = c.a;
}
ENDCG
}
Fallback "Transparent/VertexLit"
}
thank you, thank you, thank you!
That’s exactly what I was looking for! 
Many thanks again! You really saved me.
Hey,
I’ve run into some problems with this shader. It apears that when the camera is an X distance away from the object with this shader, it does some weard stuf. In some cases it just makes the whole object the same color as the background and in some cases, well, it just goes doing weard stuff…
I really hoe you guys can help me out!
Greatz,
Crash-Konijn
Attachmends:
TheProblem1: Here you can se my building while playing. The alpha object close to the camera are fine but the invisible objects in the distance are trippin.
TheProblem2: When I zoom in you can see a line from where it wil render correctly.
ComplexVSDiffuse1 - 4: These pictures where taken in the editor screen… Left an kitchen with this shader and to the right an table with transparent/diffuse.
post an example project, then it would be easier to help
Do you meen my complete project or just the build?
I’ve uploaded the build here. If you click on the big chamber to the left you should be able to see my problem.
447136–15550–$SmantWebPlayer.zip (1.32 MB)
I am talking about a simple scene which illustrates the problem (in a form of a project) and can be used for test purposes
Oke, I’l give it a go when I come home. Uploading a whole project whith a mobilephone - internet connection isn’t a good idea i suppose 
Thanks for your help so far anyway!
there’s no need for the whole project, just a few objects in a scene which illustrate the problem 
Here you go
Hope you can find the problem 
Just zoom in/out with the camera (in editor or play mode). The models that are the farest away get freaky.
447226–15554–$Smant_Problem.zip (314 KB)