multipass problem

I write a material, use surface shader, followed by a normal shader pass.
but the normal shader pass don’t work.
can’t simultaneously use surface shader and normal shader ?

Shader "Reflective/Transparent Diffuse" {
	Properties {
		_Color ("Main Color", Color) = (1,1,1,1)
		_ReflectColor ("Reflection Color", Color) = (1,1,1,1)
		_MainTex ("Base (RGB) RefStrength (A)", 2D) = "white" {} 
		_Cube ("Reflection Cubemap", Cube) = "_Skybox" { TexGen CubeReflect }
		_Kr ("Reflection", Range(0, 1)) = 0.8
		_FresnelMin("Fresnel Reflection Scale", Range(0, 1)) = 0.05
		_FresnelExp("Fresnel Exponent", Range(0, 5)) = 3.5	
	}
	SubShader {


		Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}

		
		CGPROGRAM
		#pragma surface surf BlinnPhong alpha

		float4 _Color;
		float4 _ReflectColor;
		float _Kr;
		float _FresnelMin;
		float _FresnelExp;
		
		sampler2D _MainTex;
		samplerCUBE _Cube;

		struct Input {
			float2 uv_MainTex;
			float3 worldRefl;
        	float3 viewDir;	
		};
		
		

		void surf (Input IN, inout SurfaceOutput o) {
			half4 c = tex2D (_MainTex, IN.uv_MainTex) * _Color;
			o.Albedo = c.rgb;
			o.Alpha = c.a;		
		}
		ENDCG
		
	
		pass {
			Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}
			Blend ONE ONE
			ZWrite off
			//ZTest off
			
			CGPROGRAM
			#pragma vertex vert
			#pragma fragment frag
			#pragma fragmentoption ARB_precision_hint_fastest
			#include "UnityCG.cginc"
			

	
			float4 _Color;
			float4 _ReflectColor;
			float _Kr;
			float _FresnelMin;
			float _FresnelExp;
			
			sampler2D _MainTex;
			samplerCUBE _Cube;
	
			struct v2f {
				float4 pos : POSITION;
				float2 uv : TEXCOORD0;
				float3 reflWorld : TEXCOORD1;
				float3 viewDir : TEXCOORD2;
				float3 normal : TEXCOORD3;
			};
			
			
			v2f vert(appdata_base v)
			{
				v2f o;
				o.pos = mul(UNITY_MATRIX_MVP, v.vertex);
				o.uv = v.texcoord;
			
				// calculate object space reflection vector	
				float3 viewDir = ObjSpaceViewDir( v.vertex );
				float3 I = reflect( -viewDir, v.normal );
				
				// transform to world space reflection vector
				o.reflWorld = mul( (float3x3)_Object2World, I );
				
				o.viewDir = mul((float3x3)_Object2World, viewDir);
				
				o.normal = mul((float3x3)_Object2World, v.normal);
				
				return o; 
			}
			
			half4 frag (v2f i) : COLOR
			{
				half4 reflcol = texCUBE( _Cube, i.reflWorld );

	  			half KrMin = (_Kr * _FresnelMin);
	    		half InvFrExp = (1.0f / _FresnelExp);
	    		half fresnel = lerp(_Kr, KrMin, pow(abs(dot(normalize(i.viewDir), normalize(i.normal))), InvFrExp));			
				reflcol *= fresnel;
				
				half4 result = (half4)0;
				result.rgb = reflcol.rgb * _ReflectColor.rgb;
				return result;
								
			} 			
			
			ENDCG		
		
		}
		
		

	} 
	FallBack "Trasparent/Diffuse"
}

surface shaders don’t support multipass

but if i put the surface shader after the normal shader, both of them work.

possible can’t comment on that.
But Surface Shaders themself don’t support it thats why the second pass you put in there does not work.

if you put the surface in as second pass you will likely also lose stuff like lightmapping and alike

Anyway. I may very well have missed something, a tutorial or page somewhere out there that would make it all click for me - but I’ve been looking everywhere and finally just broke down and gave up. Could you post a fairly simple step-by-step for after I have dimerocker’s API installed (shows up in the menu, I have my secret-token entered, I see the “dimeRocker arcade” object in my Hierarchy in my project, and the “dimeRocker Listener” under that…

Now say I look at the sample code for “Displaying User Information” from the docs.dimerocker.com site (Examples/Local User Example from the left-side menu on your documentation site)…

Now what?.. I tried just copying that code, but have no idea at this point where to put it. If I can figure out where that goes, it’ll all click. But I just can’t for the life of me figure out where to put it (also, I do believe there’s a line-break in the middle of that last string, and a period missing in the “drUser localUser = drClient.User.localUser;” line (about 20 lines down or so), and a reference toward the end of the example that also seems to be missing a period: "foreach (drUser friend in localUser.socialNetworkFriends)

Angila, if you have a question, start your own thread. Not sure why you’re resurrecting old ones.