pass_template:
    samplerstates:
        samLinear:
            filter: MIN_MAG_MIP_LINEAR
            addressU: CLAMP
            addressV: CLAMP
        samLinearWrap:
            filter: MIN_MAG_MIP_LINEAR
            addressU: WRAP
            addressV: WRAP
    type: match-color-input
    constant-buffers:
        globalParams: {screenSize: SCREEN_SIZE, elapsedTime: ELAPSED_TIME, captureState: CAPTURE_STATE, tileUV: TILE_UV_RANGE}
        controlBuf: {g_sldGamma: gammaSlider, g_sldExposure: exposureSlider, g_sldContrast: contrastSlider, g_sldVign: vignSlider, g_sldFilterStrength: filterSlider, g_sldScratchesStrength: scrSlider}

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

user-constants:
    - name: gammaSlider
      ui-label: "Gamma"
      ui-label-localized:
          ru-RU:  "Гамма"
          fr-FR:  "Gamma"
          it-IT:  "Gamma"
          de-DE:  "Gamma"
          es-ES:  "Gamma"
          es-MX:  "Gamma"
          zh-CHS: "伽马值"
          zh-CHT: "色差補正"
          ja-JP:  "ガンマ"
          cs-CZ:  "Gamma"
          da-DK:  "Gamma"
          el-GR:  "Γάμμα"
          en-UK:  "Gamma"
          fi-FI:  "Gamma"
          hu: "Gamma"
          ko-KR:  "감마"
          nl-NL:  "Gamma"
          nb-NO:  "Gamma"
          pl: "Gamma"
          pt-PT:  "Gama"
          pt-BR:  "Gama"
          sl-SI:  "Gama"
          sk-SK:  "Gama"
          sv-SE:  "Gamma"
          th-TH:  "แกมม่า"
          tr-TR:  "Gamma"        
      default-value: 0.17
      maximum-value: 0.4
      ui-sticky-value: 1.0
      import: [typical_slider]
    - name: exposureSlider
      ui-label: "Exposure"
      ui-label-localized:
          ru-RU:  "Экспозиция"
          fr-FR:  "Exposition"
          it-IT:  "Esposizione"
          de-DE:  "Belichtung"
          es-ES:  "Exposición"
          es-MX:  "Exposición"
          zh-CHS: "曝光"
          zh-CHT: "曝光"
          ja-JP:  "露出"
          cs-CZ:  "Expozice"
          da-DK:  "Eksponering"
          el-GR:  "Έκθεση"
          en-UK:  "Exposure"
          fi-FI:  "Valotus"
          hu: "Expozíció"
          ko-KR:  "노출"
          nl-NL:  "Belichtingstijd"
          nb-NO:  "Eksponering"
          pl: "Ekspozycja"
          pt-PT:  "Exposição"
          pt-BR:  "Exposição"
          sl-SI:  "Osvetlitev"
          sk-SK:  "Expozícia"
          sv-SE:  "Exponering"
          th-TH:  "การเปิดรับแสง"
          tr-TR:  "Pozlama"   
      ui-sticky-value: 1.0
      import: [typical_slider]
    - name: contrastSlider
      ui-label: "Contrast"
      ui-label-localized:
          ru-RU: "Контраст"
          fr-FR: "Contraste"
          it-IT: "Contrasto"
          de-DE: "Kontrast"
          es-ES: "Contraste"
          es-MX: "Contraste"
          zh-CHS: "对比度"
          zh-CHT: "對比度"
          ja-JP: "コントラスト"
          cs-CZ:  "Kontrast"
          da-DK:  "Kontrast"
          el-GR:  "Αντίθεση"
          en-UK:  "Contrast"
          fi-FI:  "Kontrasti"
          hu: "Kontraszt"
          ko-KR:  "대비"
          nl-NL:  "Contrast"
          nb-NO:  "Kontrast"
          pl: "Kontrast"
          pt-PT:  "Contraste"
          pt-BR:  "Contraste"
          sl-SI:  "Kontrast"
          sv-SE:  "Kontrast"
          sk-SK: "Kontrast"
          th-TH:  "คอนทราสต์"
          tr-TR:  "Kontrast"
      default-value: 2.0
      maximum-value: 4.0
      ui-sticky-value: 1.0
      import: [typical_slider]
    - name: vignSlider
      ui-label: "Vignette Amount"
      ui-label-localized:
          ru-RU: "Виньетка"
          fr-FR: "Vignettage"
          it-IT: "Vignettatura"
          de-DE: "Vignette"
          es-ES: "Viñeta"
          es-MX: "Viñeta"
          zh-CHS: "花饰图案"
          zh-CHT: "暈影"
          ja-JP: "ビネット"
          cs-CZ: "Vinětace"
          da-DK: "Vignet"
          el-GR: "Βινιέτα"
          en-UK: "Vignette"
          fi-FI: "Reunahäivytys"
          hu: "Vignetta"
          ko-KR: "비네트"
          nl-NL: "Vignette"
          nb-NO: "Vignett"
          pl: "Winieta"
          pt-PT: "Vignette"
          pt-BR: "Vinheta"
          sl-SI: "Vinjeta"
          sk-SK: "Vinetácia"
          sv-SE: "Vinjettering"
          th-TH: "ขอบมืด"
          tr-TR: "Vinyet"      
      ui-sticky-value: 1.0
      import: [typical_slider]
    - name: filterSlider
      ui-label: "Intensity"
      ui-label-localized:
          ru-RU: "Интенсивность"
          fr-FR: "Intensité"
          it-IT: "Intensità"
          de-DE: "Intensität"
          es-ES: "Intensidad"
          es-MX: "Intensidad"
          zh-CHS: "强度"
          zh-CHT: "強度"
          ja-JP: "彩度"
          cs-CZ: "Intenzita"
          da-DK: "Intensitet"
          el-GR: "Ένταση"
          en-UK: "Intensity"
          fi-FI: "Intensiteetti"
          hu: "Intenzitás"
          ko-KR: "강도"
          nl-NL: "Intensiteit"
          nb-NO: "Intensitet"
          pl: "Intensywność"
          pt-PT: "Intensidade"
          pt-BR: "Intensidade"
          sl-SI: "Intenzivnost"
          sk-SK: "Intenzita"
          sv-SE: "Intensitet"
          th-TH: "ความเข้ม"
          tr-TR: "Yoğunluk"
      ui-sticky-value: 1.0
      default-value: 1.0
      import: [typical_slider]
    - name: scrSlider
      ui-label: "Film Dirt Strength"
      ui-label-localized:
          ru-RU:  "Количество грязи на пленке"
          fr-FR:  "Intensité de l'effet vieux film"
          it-IT:  "Intensità dell’effetto pellicola rovinata"
          de-DE:  "Stärke des Schmutzfilmeffekts"
          es-ES:  "Intensidad de la suciedad de la película"
          es-MX:  "Intensidad de la tierra de la película"
          zh-CHS: "膜防污强度"
          zh-CHT: "影片斑紋強度"
          ja-JP:  "フィルムの汚れ強度"
          cs-CZ:  "Velikost filmového šumu"
          da-DK:  "Styrke på filmgryn"
          el-GR:  "Ισχύς βρομιάς μεμβράνης"
          en-UK:  "Film dirt strength"
          fi-FI:  "Filmin likavahvuus"
          hu: "Filmszennyeződés erőssége"
          ko-KR:  "필름 먼지 강도"
          nl-NL:  "Sterkte filmvuil"
          nb-NO:  "Styrke for filmsmuss"
          pl: "Stopień zabrudzenia filmu"
          pt-PT:  "Intensidade de imperfeições do filme"
          pt-BR:  "Força de granulação do filme"
          sl-SI:  "Moč smeti na filmu"
          sk-SK:  "Pevnosť vrstvy nečistôt"
          sv-SE:  "Filmsmutseffekt"
          th-TH:  "ความแข็งแรงของฝุ่นบนฟิล์ม"
          tr-TR:  "Film kiri miktarı"
      ui-sticky-value: 1.0
      default-value: 1.0
      import: [typical_slider]

main:
    import: [pass_template]
    shader: PSMain@OldFilm.yfx
    textures:
        texColor:
            channel: PIPE_INPUTS_COLOR
        texScratches:
            filename: scratches.bmp
