Update1DSlider() private static method

private static Update1DSlider ( Texture2D tex, int xSize, float const1, float const2, float &oldConst1, float &oldConst2, int idx, bool hsvSpace, float scale, float exposureValue, bool forceUpdate, TonemappingType tonemappingType ) : Texture2D
tex UnityEngine.Texture2D
xSize int
const1 float
const2 float
oldConst1 float
oldConst2 float
idx int
hsvSpace bool
scale float
exposureValue float
forceUpdate bool
tonemappingType TonemappingType
return UnityEngine.Texture2D
Esempio n. 1
0
        private void HSVSliders()
        {
            bool changed = GUI.changed;

            GUI.changed       = false;
            this.m_HueTexture = ColorPicker.Update1DSlider(this.m_HueTexture, 64, 1f, 1f, ref this.m_HueTextureS, ref this.m_HueTextureV, 0, true);
            this.m_SatTexture = ColorPicker.Update1DSlider(this.m_SatTexture, 8, this.m_H, Mathf.Max(this.m_V, 0.2f), ref this.m_SatTextureH, ref this.m_SatTextureV, 1, true);
            this.m_ValTexture = ColorPicker.Update1DSlider(this.m_ValTexture, 8, this.m_H, this.m_S, ref this.m_ValTextureH, ref this.m_ValTextureS, 2, true);
            float num  = (float)((int)Mathf.Round(this.m_H * 359f));
            float num2 = (float)((int)Mathf.Round(this.m_S * 255f));
            float num3 = (float)((int)Mathf.Round(this.m_V * 255f));

            num  = this.TexturedSlider(this.m_HueTexture, "H", num, 0f, 359f);
            num2 = this.TexturedSlider(this.m_SatTexture, "S", num2, 0f, 255f);
            num3 = this.TexturedSlider(this.m_ValTexture, "V", num3, 0f, 255f);
            if (GUI.changed)
            {
                this.m_H = num / 359f;
                this.m_S = num2 / 255f;
                this.m_V = num3 / 255f;
                this.HSVToRGB();
            }
            GUI.changed |= changed;
        }
Esempio n. 2
0
        private void RGBSliders()
        {
            bool changed = GUI.changed;

            GUI.changed     = false;
            this.m_RTexture = ColorPicker.Update1DSlider(this.m_RTexture, 8, this.m_G, this.m_B, ref this.m_RTextureG, ref this.m_RTextureB, 0, false);
            this.m_GTexture = ColorPicker.Update1DSlider(this.m_GTexture, 8, this.m_R, this.m_B, ref this.m_GTextureR, ref this.m_GTextureB, 1, false);
            this.m_BTexture = ColorPicker.Update1DSlider(this.m_BTexture, 8, this.m_R, this.m_G, ref this.m_BTextureR, ref this.m_BTextureG, 2, false);
            float num  = (float)((int)Mathf.Round(this.m_R * 255f));
            float num2 = (float)((int)Mathf.Round(this.m_G * 255f));
            float num3 = (float)((int)Mathf.Round(this.m_B * 255f));

            num  = this.TexturedSlider(this.m_RTexture, "R", num, 0f, 255f);
            num2 = this.TexturedSlider(this.m_GTexture, "G", num2, 0f, 255f);
            num3 = this.TexturedSlider(this.m_BTexture, "B", num3, 0f, 255f);
            if (GUI.changed)
            {
                this.m_R = num / 255f;
                this.m_G = num2 / 255f;
                this.m_B = num3 / 255f;
                this.RGBToHSV();
            }
            GUI.changed |= changed;
        }