pass_template:
    samplerstates:
        samLinear:
            filter: MIN_MAG_MIP_LINEAR
            addressU: CLAMP
            addressV: CLAMP
    type: match-color-input
    constant-buffers:
        globalParams: {screenSize: SCREEN_SIZE, captureState: CAPTURE_STATE, tileUV: TILE_UV_RANGE}
        controlBuf: { g_sldProtanopia: protanopiaSlider, g_sldDeuteranopia: deuteranopiaSlider, g_sldTritanopia: tritanopiaSlider}

typical_slider:
      type: float
      minimum-value: 0.0
      maximum-value: 1.0
      default-value: 0.0
      ui-sticky-region: 0.01
      ui-value-unit: "%"
      ui-value-min: 0
      ui-value-max: 100
      ui-value-step: 1

user-constants:
    - name: protanopiaSlider
      ui-label: "Protanopia"
      ui-label-localized:
          ru-RU:  "Протанопия"
          fr-FR:  "Protanopie"
          it-IT:  "Protanopia"
          de-DE:  "Protanopie"
          es-ES:  "Protanopia"
          es-MX:  "Protanopia"
          zh-CHS: "红色盲"
          zh-CHT: "紅色盲"
          ja-JP:  "第一色盲"
          cs-CZ:  "Protanopie"
          da-DK:  "Rødblindhed"
          el-GR:  "Πρωτανοπία"
          en-UK:  "Protanopia"
          fi-FI:  "Protanopia"
          hu: "Protanópia"
          ko-KR:  "적색약"
          nl-NL:  "Protanopie"
          nb-NO:  "Protanopi"
          pl: "Protanopia"
          pt-PT:  "Protanopia"
          pt-BR:  "Protanopia"
          sl-SI:  "Protanopija"
          sk-SK:  "Protanopia"
          sv-SE:  "Protanopi"
          th-TH:  "ตาบอดสีแดง"
          tr-TR:  "Kırmızı körlüğü"
      default-value: 0.0
      ui-sticky-value: 0.0
      import: [typical_slider]
    - name: deuteranopiaSlider
      ui-label: "Deuteranopia"
      ui-label-localized:
          ru-RU:  "Дейтеранопия"
          fr-FR:  "Deutéranopie"
          it-IT:  "Deuteranopia"
          de-DE:  "Deuteranopie"
          es-ES:  "Deuteranopía"
          es-MX:  "Deuteranopia"
          zh-CHS: "绿色盲"
          zh-CHT: "綠色盲"
          ja-JP:  "第二色盲"
          cs-CZ:  "Deuteranopie"
          da-DK:  "Grøndblindhed"
          el-GR:  "Δευτερανοπία"
          en-UK:  "Deuteranopia"
          fi-FI:  "Deuteranopia"
          hu: "Deuteranópia"
          ko-KR:  "녹색약"
          nl-NL:  "Deuteranopie"
          nb-NO:  "Deuteranopi"
          pl: "Daltonizm"
          pt-PT:  "Deuteranopia"
          pt-BR:  "Deuteranopia"
          sl-SI:  "Devteranopija"
          sk-SK:  "Deuteranopia"
          sv-SE:  "Deuteranopi"
          th-TH:  "ตาบอดสีเขียว"
          tr-TR:  "Yeşil körlüğü"
      default-value: 0.0
      ui-sticky-value: 0.0
      import: [typical_slider]
    - name: tritanopiaSlider
      ui-label: "Tritanopia"
      ui-label-localized:
          ru-RU:  "Тританопия"
          fr-FR:  "Tritanopie"
          it-IT:  "Tritanopia"
          de-DE:  "Tritanopie"
          es-ES:  "Tritanopia"
          es-MX:  "Tritanopia"
          zh-CHS: "蓝色盲"
          zh-CHT: "藍色盲"
          ja-JP:  "第三色盲"
          cs-CZ:  "Tritanopie"
          da-DK:  "Blåblindhed"
          el-GR:  "Τριτανοπία"
          en-UK:  "Tritanopia"
          fi-FI:  "Tritanopia"
          hu: "Tritanópia"
          ko-KR:  "청색약"
          nl-NL:  "Tritanopie"
          nb-NO:  "Tritanopi"
          pl: "Tritanopia"
          pt-PT:  "Tritanopia"
          pt-BR:  "Tritanopia"
          sl-SI:  "Tritanopija"
          sk-SK:  "Tritanopia"
          sv-SE:  "Tritanopi"
          th-TH:  "ตาบอดสีน้ำเงิน"
          tr-TR:  "Mavi körlüğü"
      default-value: 0.0
      ui-sticky-value: 0.0
      import: [typical_slider]

main:
    import: [pass_template]
    shader: PS_Daltonize@Colorblind.yfx
    textures:
        texColor:
            channel: PIPE_INPUTS_COLOR
