// Update the internal state.
 public void Update(Obscurance target, Camera camera)
 {
     _downsampling    = target.downsampling;
     _occlusionSource = target.occlusionSource;
     _ambientOnly     = target.ambientOnly;
     _pixelWidth      = camera.pixelWidth;
     _pixelHeight     = camera.pixelHeight;
 }
 // Check if it has to reset itself for property changes.
 public bool CheckNeedsReset(Obscurance target, Camera camera)
 {
     return
         (_downsampling != target.downsampling ||
          _occlusionSource != target.occlusionSource ||
          _ambientOnly != target.ambientOnly ||
          _pixelWidth != camera.pixelWidth ||
          _pixelHeight != camera.pixelHeight);
 }
Beispiel #3
0
 public static void InitMemberByInstance(Obscurance ob)
 {
     intensity        = ob.intensity;
     radius           = ob.radius;
     sampleCount      = ob.sampleCount;
     sampleCountValue = ob.sampleCountValue;
     downsampling     = ob.downsampling;
     occlusionSource  = ob.occlusionSource;
     ambientOnly      = ob.ambientOnly;
 }
Beispiel #4
0
        static ObscuranceDef()
        {
            if (obscuranceEffect == null)
            {
                obscuranceEffect = Util.GetComponentVar <Obscurance, ObscuranceDef>(obscuranceEffect);
            }

            intensity        = 1;
            radius           = 0.3f;
            sampleCount      = Obscurance.SampleCount.Medium;
            sampleCountValue = 24;
            downsampling     = false;
            occlusionSource  = Obscurance.OcclusionSource.GBuffer;
            ambientOnly      = false;
        }