7     [RequireComponent (typeof(Camera))]
     8     [AddComponentMenu (
"Image Effects/Other/Screen Overlay")]
    21         public float intensity = 1.0f;
    22         public Texture2D texture = null;
    24         public Shader overlayShader = null;
    25         private Material overlayMaterial = null;
    32             overlayMaterial = CheckShaderAndCreateMaterial (overlayShader, overlayMaterial);
    41             if (CheckResources() == 
false)
    43                 Graphics.Blit (source, destination);
    47             Vector4 UV_Transform = 
new  Vector4(1, 0, 0, 1);
    52             if (
Screen.orientation == ScreenOrientation.LandscapeLeft) {
    53                 UV_Transform = 
new Vector4(0, -1, 1, 0);
    55             if (
Screen.orientation == ScreenOrientation.LandscapeRight) {
    56                 UV_Transform = 
new Vector4(0, 1, -1, 0);
    58             if (
Screen.orientation == ScreenOrientation.PortraitUpsideDown) {
    59                 UV_Transform = 
new Vector4(-1, 0, 0, -1);
    63             overlayMaterial.SetVector(
"_UV_Transform", UV_Transform);
    64             overlayMaterial.SetFloat (
"_Intensity", intensity);
    65             overlayMaterial.SetTexture (
"_Overlay", texture);
    66             Graphics.Blit (source, destination, overlayMaterial, (
int) blendMode);
 
void OnRenderImage(RenderTexture source, RenderTexture destination)
 
override bool CheckResources()