<?xml version="1.0" encoding="utf-8"?>
<!--
Legacy Effect.
It's kept for backwards compatibility and should not be used on new projects.

This Effect is used by the AC3D model loader.
See simgear/scene/model/ReaderWriterAC3D.cxx
-->
<PropertyList>
  <name>Effects/model-default</name>

  <parameters>
    <texture n="0">
      <type>white</type>
    </texture>
    <cull-face>back</cull-face>
    <pbr-metallic type="float">0.0</pbr-metallic>
    <pbr-roughness type="float">0.5</pbr-roughness>
    <!-- logarithmic_depth.glsl -->
    <depth-offset type="float">0.0</depth-offset>
    <alpha-cutoff type="float">0.0</alpha-cutoff>
  </parameters>

  <technique n="109">
    <scheme>hdr-geometry</scheme>
    <pass>
      <depth>
        <enabled>true</enabled>
        <function>less</function>
        <write-mask>true</write-mask>
      </depth>
      <texture-unit>
        <unit>0</unit>
        <type><use>texture[0]/type</use></type>
        <image><use>texture[0]/image</use></image>
        <filter><use>texture[0]/filter</use></filter>
        <wrap-s><use>texture[0]/wrap-s</use></wrap-s>
        <wrap-t><use>texture[0]/wrap-t</use></wrap-t>
      </texture-unit>
      <blend><active>false</active></blend>
      <rendering-hint>opaque</rendering-hint>
      <cull-face><use>cull-face</use></cull-face>
      <program>
        <vertex-shader>Shaders/HDR/model_default.vert</vertex-shader>
        <vertex-shader>Shaders/HDR/logarithmic_depth.glsl</vertex-shader>
        <fragment-shader>Shaders/HDR/model_default.frag</fragment-shader>
        <fragment-shader>Shaders/HDR/logarithmic_depth.glsl</fragment-shader>
        <fragment-shader>Shaders/HDR/gbuffer_pack.glsl</fragment-shader>
        <fragment-shader>Shaders/HDR/normal_encoding.glsl</fragment-shader>
        <fragment-shader>Shaders/HDR/color.glsl</fragment-shader>
      </program>
      <uniform>
        <name>color_tex</name>
        <type>sampler-2d</type>
        <value type="int">0</value>
      </uniform>
      <uniform>
        <name>alpha_cutoff</name>
        <type>float</type>
        <value><use>alpha-cutoff</use></value>
      </uniform>
      <uniform>
        <name>pbr_metallic</name>
        <type>float</type>
        <value><use>pbr-metallic</use></value>
      </uniform>
      <uniform>
        <name>pbr_roughness</name>
        <type>float</type>
        <value><use>pbr-roughness</use></value>
      </uniform>
      <!-- logarithmic_depth.glsl -->
      <uniform>
        <name>depthOffset</name>
        <type>float</type>
        <value><use>depth-offset</use></value>
      </uniform>
    </pass>
  </technique>

  <technique n="119">
    <scheme>hdr-shadow</scheme>
    <pass>
      <color-mask type="vec4d">0 0 0 0</color-mask>
      <cull-face>back</cull-face>
      <blend>0</blend>
      <polygon-offset>
        <factor>1.1</factor>
        <units>4.0</units>
      </polygon-offset>
      <texture-unit>
        <unit>0</unit>
        <type><use>texture[0]/type</use></type>
        <image><use>texture[0]/image</use></image>
        <filter><use>texture[0]/filter</use></filter>
        <wrap-s><use>texture[0]/wrap-s</use></wrap-s>
        <wrap-t><use>texture[0]/wrap-t</use></wrap-t>
      </texture-unit>
      <program>
        <vertex-shader>Shaders/HDR/model_default_shadow.vert</vertex-shader>
        <fragment-shader>Shaders/HDR/model_default_shadow.frag</fragment-shader>
      </program>
      <uniform>
        <name>color_tex</name>
        <type>sampler-2d</type>
        <value type="int">0</value>
      </uniform>
      <uniform>
        <name>alpha_cutoff</name>
        <type>float</type>
        <value><use>alpha-cutoff</use></value>
      </uniform>
    </pass>
  </technique>
</PropertyList>
