- Home /
Shader Constants - Lighting Params require Queue=Geometry?
Hello,
Unity 3.5.x... This works:
Tags {"Queue"="Geometry" "RenderType"="Opaque" } ... Pass{ ... ObjSpaceLightDir( v.vertex );
This does not work:
Tags {"Queue"="Geometry+1" "RenderType"="Opaque" } ... Pass{ ... ObjSpaceLightDir( v.vertex );
(Notice the 'Geometry+1')
The second I move this SubShader out of the Geometry Pass, ObjSpaceLightDir() stops working - the shader constants for lighting appear to no longer be passed.
I've tried adding this to the Pass: Tags {"LightMode" = "Vertex"}
It helped nothing. Nada.
I've been working All. Day. Long. On a custom shader for rendering a planet's (transparent, lit) cloud layer as viewed from orbit but can't get this working - Lighting and Transparency at the same time in a CG shader. I'm fairly fluent in CG/HLSL, etc (former dev on the Microsoft Direct3D & HLSL team in fact)... But the shader pipeline lighting setup isn't doing what I expect here - what am I missing?
Answer by GianormousGames · Aug 01, 2012 at 10:20 PM
I think I have this working - but still don't quite understand.
With Queue=Geometry the "important" light in the Forward Rendering path was different than Queue=Geometry+1... I think.