Game Development Reference
In-Depth Information
Both shaders have a slider to control the alpha cutoff in case the texture's alpha map is showing
some background bleeding.
5.
Try adjusting the Alpha cutoff in both shaders.
6.
Orbit the view to make sure both sides of the planes are rendered for
both plants.
The Transparent shader does not cast shadows, but both do render two-sided (Figure 4-38 ).
Figure 4-38. Carrot and TomatoPlant; the Carrot casts a dynamic shadow
Because shadow casting can be costly, and even if you are using Unity Pro and Deferred lighting,
you may decide that minor plants do not warrant dynamic shadows. Let's see what happens
with baked lighting. First you will need to set all of the plants as Static so they will be capable of
generating shadows during the baking process. You should also save the scene to make sure you
don't lose all of the setup you've done.
1.
Select all of the plants in the Hierarchy view, and check Static at the top of the
Inspector.
2.
From Files, choose Save Scene.
3.
Name it Garden .
4.
From the Windows menu, open the Lightmapping window.
5.
Click Bake Scene from just above the Preview window.
6.
When the baking is finished, turn the Shadow Distance to 0 in the
Lightmapping dialog (Figure 4-39 ) so you will see only the baked shadows.
 
Search WWH ::




Custom Search