Create some functions is CG file.

Make two functions in shaderStencilTextureWithSoftShadowMapping.cg so
that it will be more reusable.