Non-surface shader with light probes problem

Hi:)

I’ve just upgraded my Unity to 3.5^^ (yaaay) and here’s my first problem

According to docs → http://unity3d.com/support/documentation/ScriptReference/Renderer-useLightProbes.html?from=LightProbes

My shader should works, but… I’ve got baked, probes, shader (probably with critical error:P) and still my GameObject is rendered as big black block :frowning:
Then i tried surf shader and it works:) so can anyone help me with non surf one?

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

	SubShader {
		Tags { "RenderType"="Opaque" }
		Pass{
		
			CGPROGRAM
			#include "UnityCG.cginc"
			#pragma vertex vert
			#pragma fragment frag
			#pragma fragmentoption ARB_precision_hint_fastest 
			
			struct v2f 
			{
				half4 pos : SV_POSITION;
				half4 uv : TEXCOORD0;
				half4 shlight : TEXCOORD1;
			};
				
					
			
			fixed4 _Color;
			sampler2D _MainTex;
				
			float4 _MainTex_ST;
	
			v2f vert(appdata_base v)
			{
				v2f o;
				o.pos = mul (UNITY_MATRIX_MVP, v.vertex);
				o.uv.xy = TRANSFORM_TEX(v.texcoord,_MainTex);
				
				float3 worldN = mul((float3x3)_Object2World, SCALED_NORMAL);
				float3 shlight = ShadeSH9 (float4(worldN,1.0));
				
				o.shlight.xyz = shlight;
				
				return o;
			}
			
			fixed4 frag(v2f i): COLOR0
			{
				//fixed4 tex = tex2D (_MainTex, i.uv.xy); // cuz of debug
				//tex *= _Color;

				return i.shlight;
			}
			ENDCG
		}
	} 
	FallBack OFF
}

848740--31678--$Screen Shot 2012-03-03 at 13.57.12.png

Did you ever get it going, and if so what was the answer out of curiosity?

My curiosity is quite dangerous one:P I really hate not knowing why:). As for surface shader, yes it works.
As for non-surf one heh still nooooo:( but i’ve even tried #pragma debug to surf one and slowly parsed whole debug output in order to find answer :frowning:

If any1 want to try on my example please PM me, i’ll provide my example scene and both shaders:)

You may need to pass in the coefficients yourself. You can compute them using LightProbes.GetInterpolatedLightProbe, then implement your own version of ShadeSH9 that uses them in your shader.

Any luck on this?

Tags { “RenderType”=“Opaque” “LightMode”=“ForwardBase”}