<?xml version="1.0"?>
<implementation render="Generic">
  <language name="Protein" version="2.0"/>
  <api name="Protein" version="2.0"/>
  <root_bindings name="root"/>

  <constants>
    <boolean name="prism_metal_color_by_object"                val="false"/>
    <float   name="prism_metal_reflectivity_at_90deg"          val="0.0"/>
    <boolean name="prism_metal_is_metal"                       val="true"/>
    <float   name="prism_metal_transparency"                   val="0.0"/>
    <float   name="prism_metal_transparency_image_fade"        val="0.0"/>
    <float   name="prism_metal_refraction_index"               val="1.4"/>
    <float   name="prism_metal_refraction_translucency_weight" val=".5"/>
    <boolean name="prism_metal_backface_cull"                  val="false"/>
    <float   name="prism_metal_self_illum_luminance"           val="0.0"/>
    <float   name="prism_metal_self_illum_color_temperature"   val="0.0"/>
	<boolean name="prism_metal_common_Tint_toggle"             val="false"/>
  </constants>

  <operator function="PrismMetalDiffuseColorBOF" name="diffuse_color">
    <map_interface source="metal_f0"       destination="metal_f0"/>
	<map_interface source="surface_albedo" destination="surface_albedo"/>
  </operator>
  
  <operator function="PrismMetalDiffuseImageFadeBOF" name="diffuse_image_fade">
    <map_interface source="metal_f0"       destination="metal_f0"/>
	<map_interface source="surface_albedo" destination="surface_albedo"/>
  </operator>
  
  <operator function="PrismMetalReflectivityNormalBOF" name="reflectivity_normal">
    <map_interface source="metal_f0" destination="metal_f0"/>
  </operator>
  
  <operator function="PrismCommonGlossinessBOF" name="glossiness">
    <map_interface source="surface_ndf_type"  destination="ndf_type"/>
	<map_interface source="surface_roughness" destination="roughness"/>
  </operator>
  
  <operator function="PrismCommonBumpAmountBOF" name="bump_amount">
    <map_interface source="bumpmap_Type"        destination="type"/>
	<map_interface source="bumpmap_Depth"       destination="depth"/>
	<map_interface source="bumpmap_NormalScale" destination="normal_scale"/>
  </operator>

  <bindings target="shader" name="root">
    <map_constant  source="prism_metal_color_by_object"                destination="color_by_object"/> 
	<map_bindings  source="diffuse_map"                                destination="generic_diffuse"/>
    <map_operator  source="diffuse_color"                              destination="generic_diffuse"/>
	<map_operator  source="diffuse_image_fade"                         destination="generic_diffuse_image_fade"/>
    <map_operator  source="reflectivity_normal"                        destination="generic_reflectivity_at_0deg"/>
    <map_constant  source="prism_metal_reflectivity_at_90deg"          destination="generic_reflectivity_at_90deg"/>
    <map_operator  source="glossiness"                                 destination="generic_glossiness"/>
    <map_constant  source="prism_metal_is_metal"                       destination="generic_is_metal"/>
    <map_constant  source="prism_metal_transparency"                   destination="generic_transparency"/>
    <map_constant  source="prism_metal_transparency_image_fade"        destination="generic_transparency_image_fade"/>
    <map_constant  source="prism_metal_refraction_index"               destination="generic_refraction_index"/>
    <map_constant  source="prism_metal_refraction_translucency_weight" destination="generic_refraction_translucency_weight"/>
    <map_bindings  source="cutout_opacity_map"                         destination="generic_cutout_opacity"/>
    <map_constant  source="prism_metal_backface_cull"                  destination="generic_backface_cull"/>
    <map_constant  source="prism_metal_self_illum_luminance"           destination="generic_self_illum_luminance"/>
    <map_constant  source="prism_metal_self_illum_color_temperature"   destination="generic_self_illum_color_temperature"/>
	<map_operator  source="bump_amount"                                destination="generic_bump_amount"/>
    <map_bindings  source="bump_map_asset"                             destination="generic_bump_map"/>
    <map_constant  source="prism_metal_common_Tint_toggle"             destination="common_Tint_toggle"/>
  </bindings>

  <operator function="PrismCommonCutoutPropertyNameBOF" name="cutout_map_property_name" />
  
  <bindings target="cutout_opacity_map" name="cutout_opacity_map">
    <map_operator source="cutout_map_property_name" destination="property_name" />
  </bindings>
  
  <operator function="PrismCommonBumpMapAssetNameBOF"      name="bump_map_asset_name"/>
  <operator function="PrismCommonBumpMapBindingsNameBOF"   name="bump_map_asset_bindings_name"/>
  <operator function="PrismCommonBumpMapBindingSrcNameBOF" name="bump_map_asset_bindings_source_name"/>
  
  <bindings target="bump_map_asset_instance" name="bump_map_asset">
    <map_operator  source="bump_map_asset_name"                 destination="asset_name"/>
    <map_operator  source="bump_map_asset_bindings_name"        destination="bindings_name"/>
	<map_operator  source="bump_map_asset_bindings_source_name" destination="bindings_source_name"/>
  </bindings>
  
  <bindings target="bump_map_asset_instance" name="bump_map_unifiedbitmap">
    <map_interface  source="bumpmap_Bitmap"                        destination="unifiedbitmap_Bitmap"/>
	<map_interface  source="Hidden"                                destination="Hidden"/>
	<map_interface  source="common_Tint_toggle"                    destination="common_Tint_toggle"/>
	<map_interface  source="texture_LinkTextureTransforms"         destination="texture_LinkTextureTransforms"/>
	<map_interface  source="texture_OffsetLock"                    destination="texture_OffsetLock"/>
	<map_interface  source="texture_ScaleLock"                     destination="texture_ScaleLock"/>
	<map_interface  source="texture_URepeat"                       destination="texture_URepeat"/>
	<map_interface  source="texture_VRepeat"                       destination="texture_VRepeat"/>
	<map_interface  source="texture_MapChannel"                    destination="texture_MapChannel"/>
	<map_interface  source="texture_MapChannel_ID_Advanced"        destination="texture_MapChannel_ID_Advanced"/>
	<map_interface  source="texture_MapChannel_UVWSource_Advanced" destination="texture_MapChannel_UVWSource_Advanced"/>
	<map_interface  source="texture_RealWorldOffsetX"              destination="texture_RealWorldOffsetX"/>
	<map_interface  source="texture_RealWorldOffsetY"              destination="texture_RealWorldOffsetY"/>
    <map_interface  source="texture_RealWorldScaleX"               destination="texture_RealWorldScaleX"/>
    <map_interface  source="texture_RealWorldScaleY"               destination="texture_RealWorldScaleY"/>
	<map_interface  source="texture_UOffset"                       destination="texture_UOffset"/>
	<map_interface  source="texture_VOffset"                       destination="texture_VOffset"/>
	<map_interface  source="texture_UScale"                        destination="texture_UScale"/>
	<map_interface  source="texture_VScale"                        destination="texture_VScale"/>
	<map_interface  source="texture_UVScale"                       destination="texture_UVScale"/>
	<map_interface  source="texture_WAngle"                        destination="texture_WAngle"/>
	<map_interface  source="common_Tint_color"                     destination="common_Tint_color"/>
  </bindings>
  
  <operator function="PrismMetalDiffuseMapBOF" name="diffuse_map_property_name">
    <map_interface source="metal_f0"       destination="metal_f0"/>
	<map_interface source="surface_albedo" destination="surface_albedo"/>
  </operator>

  <bindings target="diffuse_map" name="diffuse_map">
    <map_operator source="diffuse_map_property_name" destination="property_name" />
  </bindings>
  
</implementation>
