Hey guys n gals,
I was just wandering if there was a shader already in Unity that handels Diffuse, Specular, Normal, Transparency, and Lightbake(in the second UV channel)
I can only find combinations of the above.
Problem is, I have alot of Objects in my scene that rely on Alpha cutouts to simulate geometry, bars, ropes, chains, window frames etc, door frames, etc.
And i need to really have a transparent lightbaked material for these.
Is that possible? Is there any shaders doing the rounds that might be of use here?
Regards
Chris
You could use this as a start and modify it to your needs.
I just hacked it together from the built-in shader-pack in notepad at work (no Unity installed here), so it is far from optimal and untested.
But it should work on anything PS2+ with fallback to the normal vertexlit cutout for older cards.
The lightmap is blended additively with the direct pixel lights, so it won’t darken them, the lightmap basically works as a GI lighting pass with the direct lighting added on top. Should work correctly with realtime shadows.
If you want the lightmap to be your main lighting and just use the direct lights as specular you have to fiddle around with the blending of the two. (near the end, currently “c = c+lm;”)
Hope this helps. Will test it tonight when I get home and update it if needed.
I am not a programmer, it’s prolly very unoptimized. Typical artist-made-shader 
edit:
I noticed the “Transparent/Cutout/Specular/BASE” Pass in in front of the pixel light pass is missing. So maybe put that back in to avoid weirdness if you have several pixel lights or such 
223577–8082–$alphatestbumpspeclm_213.shader (2.2 KB)
Hi GaborD,
Thanks so much for you help! Im using no light in this, litterally working from a the GI for lighting/shadows etc over the top of the diffuse/spec/alpha and normals.
I’ll take a look at the shader and will let you know I get on!
Thanks again!
Chris
WOW! Thank you very very much! This is exactly what i need! youve saved my life mate haha! I think my wish list for the ultimate shader would be this combined with alpha blend and reflection map, but im pretty sure thats just crazy talk!
Thanks again
Chris
Few problems Ive just found and not sure how to fix
Basically, when I use that shader, it only works for the lightmap material and the cutout. The diffuse, bump and specular don’t work.
Any Idea why that may be??
Chris
Make sure you have a pixel light shining on the object.
Bump/Specular stuff only works with pixel lighting.
Unless you want to achieve bumpmapping without any realtime lighting, then you will prolly have to try something like directional lightmaps and use cubemaps for speculars.