private static Update1DSlider ( |
||
tex | ||
xSize | int | |
const1 | float | |
const2 | float | |
oldConst1 | float | |
oldConst2 | float | |
idx | int | |
hsvSpace | bool | |
scale | float | |
exposureValue | float | |
forceUpdate | bool | |
tonemappingType | TonemappingType | |
return |
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; }
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; }