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_sldIntensity: intensitySlider, g_sldDistance: distSlider, g_sldInvert: invSlider, g_sldEnableDepth: enabledepthSlider}

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.01

boolean_slider:
      type: bool

user-constants:
    - name: intensitySlider
      ui-label: "Intensity"
      ui-label-localized:
          cs-CZ: "Intenzita"
          da-DK: "Intensitet"
          de-DE: "Intensität"
          el-GR: "Ένταση"
          en-UK: "Intensity"
          es-ES: "Intensidad"
          es-MX: "Intensidad"
          fi-FI: "Voimakkuus"
          fr-FR: "Intensité"
          hu: "Intenzitás"
          it-IT: "Intensità"
          ja-JP: "明度"
          ko-KR: "강도"
          nl-NL: "Intensiteit"
          nb-NO: "Intensitet"
          pl: "Intensywność"
          pt-PT: "Intensidade"
          pt-BR: "Intensidade"
          ru-RU: "Насыщенность"
          sk-SK: "Intenzita"
          sl-SI: "Intenzivnost"
          sv-SE: "Intensitet"
          th-TH: "ความเข้ม"
          tr-TR: "Yoğunluk"
          zh-CHS: "强度"
          zh-CHT: "強度"
      default-value: 1.0
      import: [typical_slider]
    - name: enabledepthSlider
      ui-label: "Enable Depth"
      ui-label-localized:
          cs-CZ: "Aktivovat hloubku"
          da-DK: "Aktivér dybde"
          de-DE: "Tiefe aktivieren"
          el-GR: "Ενεργοποίηση βάθους"
          en-UK: "Enable Depth"
          es-ES: "Activar profundidad"
          es-MX: "Activar profundidad"
          fi-FI: "Ota käyttöön syvyys"
          fr-FR: "Activer la profondeur"
          hu: "Mélység bekapcsolása"
          it-IT: "Abilita profondità"
          ja-JP: "深度を有効化"
          ko-KR: "깊이 활성화"
          nl-NL: "Diepte inschakelen"
          nb-NO: "Aktiver dybde"
          pl: "Włącz głębię"
          pt-PT: "Activar profundidade"
          pt-BR: "Habilitar profundidade"
          ru-RU: "Включить глубину"
          sk-SK: "Aktivovať hĺbku"
          sl-SI: "Omogoči globino"
          sv-SE: "Aktivera djup"
          th-TH: "เปิดใช้ความลึก"
          tr-TR: "Derinliği Etkinleştir"
          zh-CHS: "启用深度"
          zh-CHT: "啟用深度"
      import: [boolean_slider]      
    - name: distSlider
      ui-label: "Border Distance"
      ui-label-localized:
          cs-CZ: "Vzdálenost ohraničení"
          da-DK: "Grænsesafstand"
          de-DE: "Randabstand"
          el-GR: "Απόσταση περιθωρίου"
          en-UK: "Border Distance"
          es-ES: "Distancia de borde"
          es-MX: "Distancia del borde"
          fi-FI: "Reunan etäisyys"
          fr-FR: "Distance des contours"
          hu: "Szegélytávolság"
          it-IT: "Distanza bordo"
          ja-JP: "ボーダー距離"
          ko-KR: "테두리 거리"
          nl-NL: "Randafstand"
          nb-NO: "Kantavstand"
          pl: "Odległość graniczna"
          pt-PT: "Distância do limite"
          pt-BR: "Distância da borda"
          ru-RU: "Дальность границ"
          sk-SK: "Vzdialenosť orámovania"
          sl-SI: "Razdalja roba"
          sv-SE: "Kantdistans"
          th-TH: "ระยะของขอบ"
          tr-TR: "Sınır Mesafesi"
          zh-CHS: "边界距离"
          zh-CHT: "邊框距離"
      default-value: 0.5
      import: [typical_slider]
    - name: invSlider
      ui-label: "Reverse Depth Mask"
      ui-label-localized:
          cs-CZ: "Maska hloubky převrácení"
          da-DK: "Omvendt dybdemaske"
          de-DE: "Umgekehrte Tiefenmaske"
          el-GR: "Ανάστροφη μάσκας βάθους"
          en-UK: "Reverse Depth Mask"
          es-ES: "Máscara de respiración invertida"
          es-MX: "Máscara de profundidad inversa"
          fi-FI: "Käänteinen syvyysmaski"
          fr-FR: "Masque de profondeur inversé"
          hu: "Fordított mélység maszk"
          it-IT: "Maschera di profondità invertita"
          ja-JP: "深度マスクの反転"
          ko-KR: "역방향 깊이 마스크"
          nl-NL: "Omgekeerde dieptestructuur"
          nb-NO: "Omvendt dybdemaske"
          pl: "Maska odwróconej głębi"
          pt-PT: "Máscara de profundidade invertida"
          pt-BR: "Máscara de profundidade inversa"
          ru-RU: "Обратная маска глубины"
          sk-SK: "Spätná maska hĺbky"
          sl-SI: "Maska obratne globine"
          sv-SE: "Reverserad djupmask"
          th-TH: "มาส์กกลับความลึก"
          tr-TR: "Ters Derinlik Maskesi"
          zh-CHS: "反向深度蒙版"
          zh-CHT: "反向深度遮罩"
      import: [boolean_slider]

main:
    import: [pass_template]
    shader: PSMain@BlacknWhite.yfx
    textures:
        texColor:
            channel: PIPE_INPUTS_COLOR
        texDepth:
            channel: PIPE_INPUTS_DEPTH