예제 #1
0
 private void CreateBokehOffsets(ApertureShape shape)
 {
     this.m_bokehOffsets.Clear();
     if (shape != ApertureShape.Square)
     {
         if (shape != ApertureShape.Hexagon)
         {
             if (shape == ApertureShape.Octagon)
             {
                 this.m_bokehOffsets.Add(new AmplifyBokehData(this.CalculateBokehSamples(8, this.m_offsetRotation)));
                 this.m_bokehOffsets.Add(new AmplifyBokehData(this.CalculateBokehSamples(8, this.m_offsetRotation + 65f)));
                 this.m_bokehOffsets.Add(new AmplifyBokehData(this.CalculateBokehSamples(8, this.m_offsetRotation + 90f)));
                 this.m_bokehOffsets.Add(new AmplifyBokehData(this.CalculateBokehSamples(8, this.m_offsetRotation + 115f)));
             }
         }
         else
         {
             this.m_bokehOffsets.Add(new AmplifyBokehData(this.CalculateBokehSamples(8, this.m_offsetRotation)));
             this.m_bokehOffsets.Add(new AmplifyBokehData(this.CalculateBokehSamples(8, this.m_offsetRotation - 75f)));
             this.m_bokehOffsets.Add(new AmplifyBokehData(this.CalculateBokehSamples(8, this.m_offsetRotation + 75f)));
         }
     }
     else
     {
         this.m_bokehOffsets.Add(new AmplifyBokehData(this.CalculateBokehSamples(8, this.m_offsetRotation)));
         this.m_bokehOffsets.Add(new AmplifyBokehData(this.CalculateBokehSamples(8, this.m_offsetRotation + 90f)));
     }
 }
예제 #2
0
        private void CreateBokehOffsets(ApertureShape shape)
        {
            this.m_bokehOffsets.Clear();
            switch (shape)
            {
            case ApertureShape.Square:
                this.m_bokehOffsets.Add(new AmplifyBokehData(this.CalculateBokehSamples(8, this.m_offsetRotation)));
                this.m_bokehOffsets.Add(new AmplifyBokehData(this.CalculateBokehSamples(8, this.m_offsetRotation + 90f)));
                return;

            case ApertureShape.Hexagon:
                this.m_bokehOffsets.Add(new AmplifyBokehData(this.CalculateBokehSamples(8, this.m_offsetRotation)));
                this.m_bokehOffsets.Add(new AmplifyBokehData(this.CalculateBokehSamples(8, this.m_offsetRotation - 75f)));
                this.m_bokehOffsets.Add(new AmplifyBokehData(this.CalculateBokehSamples(8, this.m_offsetRotation + 75f)));
                return;

            case ApertureShape.Octagon:
                this.m_bokehOffsets.Add(new AmplifyBokehData(this.CalculateBokehSamples(8, this.m_offsetRotation)));
                this.m_bokehOffsets.Add(new AmplifyBokehData(this.CalculateBokehSamples(8, this.m_offsetRotation + 65f)));
                this.m_bokehOffsets.Add(new AmplifyBokehData(this.CalculateBokehSamples(8, this.m_offsetRotation + 90f)));
                this.m_bokehOffsets.Add(new AmplifyBokehData(this.CalculateBokehSamples(8, this.m_offsetRotation + 115f)));
                return;

            default:
                return;
            }
        }
예제 #3
0
        void CreateBokehOffsets(ApertureShape shape)
        {
            m_bokehOffsets.Clear();
            switch (shape)
            {
            case ApertureShape.Square:
            {
                m_bokehOffsets.Add(new AmplifyBokehData(CalculateBokehSamples(PerPassSampleCount, m_offsetRotation)));
                m_bokehOffsets.Add(new AmplifyBokehData(CalculateBokehSamples(PerPassSampleCount, m_offsetRotation + 90)));
            }
            break;

            case ApertureShape.Hexagon:
            {
                m_bokehOffsets.Add(new AmplifyBokehData(CalculateBokehSamples(PerPassSampleCount, m_offsetRotation)));
                m_bokehOffsets.Add(new AmplifyBokehData(CalculateBokehSamples(PerPassSampleCount, m_offsetRotation - 75)));
                m_bokehOffsets.Add(new AmplifyBokehData(CalculateBokehSamples(PerPassSampleCount, m_offsetRotation + 75)));
            }
            break;

            case ApertureShape.Octagon:
            {
                m_bokehOffsets.Add(new AmplifyBokehData(CalculateBokehSamples(PerPassSampleCount, m_offsetRotation)));
                m_bokehOffsets.Add(new AmplifyBokehData(CalculateBokehSamples(PerPassSampleCount, m_offsetRotation + 65)));
                m_bokehOffsets.Add(new AmplifyBokehData(CalculateBokehSamples(PerPassSampleCount, m_offsetRotation + 90)));
                m_bokehOffsets.Add(new AmplifyBokehData(CalculateBokehSamples(PerPassSampleCount, m_offsetRotation + 115)));
            }
            break;
            }
        }