<?xml version="1.0" encoding="utf-8"?>

<PropertyList>
  <name>Effects/model-pbr-wingflex</name>
  <inherits-from>Effects/model-pbr</inherits-from>

  <parameters>
    <wingflex-type type="int">0</wingflex-type>
    <body-width type="float">0.7</body-width>
    <wing-span type="float">15.0</wing-span>
    <wingflex-alpha>0.0</wingflex-alpha>
    <wingflex-trailing-alpha>0.0</wingflex-trailing-alpha>
    <wingsweep-factor>0.0</wingsweep-factor>
    <wingflex-z>0.0</wingflex-z>
    <!-- Sub: rotation -->
    <rotation-rad type="float">0.0</rotation-rad>
    <rotation-1 type="vec3d">0.0 0.0 0.0</rotation-1>
    <rotation-2 type="vec3d">0.0 0.0 0.0</rotation-2>
  </parameters>

  <!-- Overwrite the geometry technique -->
  <technique n="109">
    <pass>
      <define>
        <name>USE_WINGFLEX_DEFORMATION</name>
      </define>
      <!-- Add the wingflex vertex shader -->
      <program>
        <vertex-shader n="100">Shaders/HDR/wingflex.glsl</vertex-shader>
      </program>
      <!-- And its required uniforms -->
      <uniform>
        <name>wingflex_type</name>
        <type>int</type>
        <value><use>wingflex-type</use></value>
      </uniform>
      <uniform>
        <name>wingflex_alpha</name>
        <type>float</type>
        <value><use>wingflex-alpha</use></value>
      </uniform>
      <uniform>
        <name>wingflex_trailing_alpha</name>
        <type>float</type>
        <value><use>wingflex-trailing-alpha</use></value>
      </uniform>
      <uniform>
        <name>wingsweep_factor</name>
        <type>float</type>
        <value><use>wingsweep-factor</use></value>
      </uniform>
      <uniform>
        <name>wingflex_z</name>
        <type>float</type>
        <value><use>wingflex-z</use></value>
      </uniform>
      <uniform>
        <name>body_width</name>
        <type>float</type>
        <value><use>body-width</use></value>
      </uniform>
      <uniform>
        <name>wing_span</name>
        <type>float</type>
        <value><use>wing-span</use></value>
      </uniform>
      <uniform>
        <name>rotation_rad</name>
        <type>float</type>
        <value><use>rotation-rad</use></value>
      </uniform>
      <uniform>
        <name>rotation_1</name>
        <type>float-vec3</type>
        <value><use>rotation-1</use></value>
      </uniform>
      <uniform>
        <name>rotation_2</name>
        <type>float-vec3</type>
        <value><use>rotation-2</use></value>
      </uniform>
    </pass>
  </technique>

  <!-- Overwrite the shadow technique -->
  <technique n="119">
    <pass>
      <define>
        <name>USE_WINGFLEX_DEFORMATION</name>
      </define>
      <!-- Add the chute vertex shader -->
      <program>
        <vertex-shader n="100">Shaders/HDR/wingflex.glsl</vertex-shader>
      </program>
      <!-- And its required uniforms -->
      <uniform>
        <name>wingflex_type</name>
        <type>int</type>
        <value><use>wingflex-type</use></value>
      </uniform>
      <uniform>
        <name>body_width</name>
        <type>float</type>
        <value><use>body-width</use></value>
      </uniform>
      <uniform>
        <name>wing_span</name>
        <type>float</type>
        <value><use>wing-span</use></value>
      </uniform>
      <uniform>
        <name>wingflex_alpha</name>
        <type>float</type>
        <value><use>wingflex-alpha</use></value>
      </uniform>
      <uniform>
        <name>wingflex_trailing_alpha</name>
        <type>float</type>
        <value><use>wingflex-trailing-alpha</use></value>
      </uniform>
      <uniform>
        <name>wingsweep_factor</name>
        <type>float</type>
        <value><use>wingsweep-factor</use></value>
      </uniform>
      <uniform>
        <name>wingflex_z</name>
        <type>float</type>
        <value><use>wingflex-z</use></value>
      </uniform>
      <uniform>
        <name>rotation_rad</name>
        <type>float</type>
        <value><use>rotation-rad</use></value>
      </uniform>
      <uniform>
        <name>rotation_1</name>
        <type>float-vec3</type>
        <value><use>rotation-1</use></value>
      </uniform>
      <uniform>
        <name>rotation_2</name>
        <type>float-vec3</type>
        <value><use>rotation-2</use></value>
      </uniform>
    </pass>
  </technique>
</PropertyList>
