- Home /
Unity 5 bug standard cutout shader and light mapping
I first noticed this when I created a test scene to figure out settings for light mapping much bigger scenes. I have a shader forge shader and I couldn't figure out why I couldn't get a shadow made for these objects. It turned out that when opacity clip is enabled with a differed shader the shadows wont render in to the light map.
I looked at the standard shader in unity and started changing the rendering modes and built light maps for each mode. The cutout rendering mode also does not render shadows to the light map.
I have explored everything I can think of, how am I going render light maps for cutout blades of grass?
Im using 5.0.1f1
Answer by 8bit4life · Jul 28, 2015 at 06:24 PM
Did you find a solution to this?
An object with a cutout shader that worked on 4.6 vs baked lightmaps has no lights baked on it in Unity 5.1 (latest). Not even from emissive lights emitted by itself. All other objects around it receive all lights, including the emission from this cutout object. I migrated towards the Standard Shader for cutout / backed, but still no joy.
Answer by Bruce_GMC · Jul 29, 2015 at 12:34 AM
Further testing proved that Unity's shader is not at fault, the faulted logic is ShaderForge's. By setting the standard shader to cutout you can receive the correct cast shadow in the lightmap. By using this lightmap you may be able to apply it over top a custom shader. My example shows the purple grass with the standard shader applied that can be seen on the left. The green grass is the shaderforge shader. Cheers and good luck.
Thanks Bruce, greatly appreciated. I think my issue is different then (as I'm using the standard shader already).
For those with similar issues: I created a thread with screenshots / scene archive that demonstrates the issue. http://forum.unity3d.com/threads/cutout-material-wont-let-baked-emission-through-itself.344449/
Your answer
Follow this Question
Related Questions
Replacing lightmap shader pass 0 Answers
Reflections not working on IOS 2 Answers
How to use the Unity 5 Transparent Shader? 1 Answer
Objects Not Visible In Low End Computer. (Shader Error) 1 Answer
Read depth buffer on the cpu 1 Answer