Exemple #1
0
 public void AdjustBlending(float val, Brightness.AdjustLightmap options, Texture2D dest)
 {
     if (BlendTexture != null)
     {
         if (last + val > Min && last + val < Max)
         {
             if (this.gameObject.isStatic && this.GetComponent <Renderer>() != null)
             {
                 if (options == Brightness.AdjustLightmap.Both)
                 {
                     BlendNow(LightmapSettings.lightmaps[this.GetComponent <Renderer>().lightmapIndex].lightmapColor, dest, val);
                     BlendNow(LightmapSettings.lightmaps[this.GetComponent <Renderer>().lightmapIndex].lightmapDir, dest, val);
                 }
                 else if (options == Brightness.AdjustLightmap.Far)
                 {
                     BlendNow(LightmapSettings.lightmaps[this.GetComponent <Renderer>().lightmapIndex].lightmapColor, dest, val);
                 }
                 else if (options == Brightness.AdjustLightmap.Near)
                 {
                     BlendNow(LightmapSettings.lightmaps[this.GetComponent <Renderer>().lightmapIndex].lightmapDir, dest, val);
                 }
             }
             else
             {
                 Debug.Log("Lightmap Manager requires a static gameObject with a renderer to do this job.");
             }
             //   last += level;
         }
         else
         {
             IsExecuting = false;
         }
     }
 }
Exemple #2
0
 public void AdjustBlendingCurve(Brightness.AdjustLightmap options, Texture2D dest)
 {
     if (this.gameObject.isStatic && this.GetComponent <Renderer>() != null)
     {
         if (options == Brightness.AdjustLightmap.Both)
         {
             BlendNow(LightmapSettings.lightmaps[this.GetComponent <Renderer>().lightmapIndex].lightmapColor, dest, currentCurveVal);
             BlendNow(LightmapSettings.lightmaps[this.GetComponent <Renderer>().lightmapIndex].lightmapDir, dest, currentCurveVal);
         }
         else if (options == Brightness.AdjustLightmap.Far)
         {
             BlendNow(LightmapSettings.lightmaps[this.GetComponent <Renderer>().lightmapIndex].lightmapColor, dest, currentCurveVal);
         }
         else if (options == Brightness.AdjustLightmap.Near)
         {
             BlendNow(LightmapSettings.lightmaps[this.GetComponent <Renderer>().lightmapIndex].lightmapDir, dest, currentCurveVal);
         }
     }
     else
     {
         Debug.Log("Lightmap Manager requires a static gameObject with a renderer to do this job.");
     }
     //   last += level;
 }