<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
  height="400"
  layout="topleft"
  name="prefs_graphics_advanced"
  help_topic="Preferences_Graphics_Advanced"
  single_instance="true"
  save_rect="true"
  title="ADVANCED GRAPHICS PREFERENCES"
  width="800">

<!-- This block shows Advanced Settings -->

  <text
    type="string"
    length="1"
    follows="left|top"
    height="16"
    layout="topleft"
    name="GeneralText"
    top="5"
    left="10"
    width="128">
     General
  </text>

  <slider
    control_name="RenderFarClip"
    decimal_digits="0"
    follows="left|top"
    height="16"
    increment="8"
    initial_value="160"
    label="Draw distance:"
    label_width="185"
    layout="topleft"
    left="30"
    min_val="64"
    max_val="512"
    name="DrawDistance"
    top_delta="16"
    width="330" />
  <text
    type="string"
    length="1"
    follows="left|top"
    height="16"
    layout="topleft"
    name="DrawDistanceMeterText2"
    top_delta="0"
    left_delta="330"
    width="20">
     m
  </text> 
  <slider
    control_name="RenderMaxPartCount"
    decimal_digits="0"
    follows="left|top"
    height="16"
    increment="256"
    initial_value="4096"
    label="Max. particle count:"
    label_width="185"
    layout="topleft"
    left="30"
    max_val="8192"
    name="MaxParticleCount"
    top_delta="16"
    width="336" />

  <slider
    control_name="RenderGlowResolutionPow"
    decimal_digits="0"
    follows="left|top"
    height="16"
    increment="1"
    initial_value="8"
    label="Post process quality:"
    label_width="185"
    layout="topleft"
    left="30"
    min_val="8"
    max_val="9"
    name="RenderPostProcess"
    show_text="false"
    top_delta="16"
    width="300">
    <slider.commit_callback
      function="Pref.UpdateSliderText"
      parameter="PostProcessText" />
  </slider>
  <text
    type="string"
    length="1"
    follows="left|top"
    height="16"
    layout="topleft"
    name="PostProcessText"
    top_delta="0"
    left_delta="304"
    width="65">
       Low
  </text>

  <text
    type="string"
    length="1"
    follows="left|top"
    height="16"
    layout="topleft"
    name="AvatarText"
    top_delta="20"
    left="10"
    width="128">
     Avatar
  </text>

  <slider
    control_name="IndirectMaxComplexity"
    tool_tip="Controls at what point a visually complex avatar is drawn as a JellyDoll"
    follows="left|top"
    height="16"
    initial_value="101"
    increment="1"
    label="Maximum complexity:"
    label_width="185"
    layout="topleft"
    left="30"
    min_val="1"
    max_val="101"
    name="IndirectMaxComplexity"
    show_text="false"
    top_delta="16"
    width="300">
    <slider.commit_callback
      function="Pref.UpdateIndirectMaxComplexity"
      parameter="IndirectMaxComlexityText" />
  </slider>
  <text
    type="string"
    length="1"
    follows="left|top"
    height="16"
    layout="topleft"
    top_delta="0"
    left_delta="304"
    text_readonly_color="LabelDisabledColor"
    name="IndirectMaxComplexityText"
    width="65">
       0
  </text>

  <slider
    control_name="IndirectMaxNonImpostors"
    decimal_digits="0"
    follows="left|top"
    height="16"
    increment="1"
    initial_value="12"
    label="Max. # of non-impostors:"
    label_width="185"
    layout="topleft"
    left="30"
    min_val="1"
    max_val="66"
    name="IndirectMaxNonImpostors"
    show_text="false"
    top_delta="16"
    width="300">
    <slider.commit_callback
      function="Pref.UpdateIndirectMaxNonImpostors"
      parameter="IndirectNonImpostorsText" />
  </slider>
  <text
    type="string"
    length="1"
    follows="left|top"
    height="16"
    layout="topleft"
    top_delta="0"
    left_delta="304"
    text_readonly_color="LabelDisabledColor"
    name="IndirectMaxNonImpostorsText"
    width="65">
       0
  </text>

  <slider
    control_name="RenderAvatarLODFactor"
    follows="left|top"
    height="16"
    increment="0.125"
    initial_value="160"
    label="Detail:"
    label_width="185"
    layout="topleft"
    left="30"
    name="AvatarMeshDetail"
    show_text="false"
    top_delta="16"
    width="300">
    <slider.commit_callback
      function="Pref.UpdateSliderText"
      parameter="AvatarMeshDetailText" />
  </slider>
  <text
    type="string"
    length="1"
    follows="left|top"
    height="16"
    layout="topleft"
    name="AvatarMeshDetailText"
    top_delta="0"
    left_delta="304"
    width="65">
     Low
  </text>

  <slider
    control_name="RenderAvatarPhysicsLODFactor"
    follows="left|top"
    height="16"
    initial_value="100"
    increment=".05"
    label="Physics:"
    label_width="185"
    layout="topleft"
    left="30"
    name="AvatarPhysicsDetail"
    show_text="false"
    top_delta="16"
    width="300">
    <slider.commit_callback
      function="Pref.UpdateSliderText"
      parameter="AvatarPhysicsDetailText" />
  </slider>
  <text
    type="string"
    length="1"
    follows="left|top"
    height="16"
    layout="topleft"
    top_delta="0"
    left_delta="304"
    name="AvatarPhysicsDetailText"
    width="65">
       Low
  </text>

  <text
    type="string"
    length="1"
    follows="left|top"
    height="16"
    layout="topleft"
    name="HardwareText"
    top_delta="20"
    left="10"
    width="128">
     Hardware
  </text>

  <slider
    control_name="TextureMemory"
    decimal_digits="0"
    follows="left|top"
    height="16"
    increment="16"
    initial_value="32"
    label="Texture Memory (MB):"
    label_width="185"
    layout="topleft"
    left="30"
    max_val="2048"
    name="GraphicsCardTextureMemory"
    tool_tip="Amount of memory to allocate for textures. Defaults to one third of total graphics memory. Reducing this may improve performance but may also make textures blurry.  Increasing may make textures sharper, but may also cause frame stalls and instability."
    top_delta="16"
    width="335" />

  <slider
    control_name="RenderFogRatio"
    follows="left|top"
    height="16"
    initial_value="4"
    decimal_digits="1"
    label="Fog Distance Ratio:"
    label_width="185"
    layout="topleft"
    left="30"
    name="fog"
    min_val="0.5"
    max_val="10"
    increment="0.1"
    top_delta="16"
    width="332" />

  <slider
    control_name="RenderGamma"
    follows="left|top"
    height="16"
    initial_value="1"
    decimal_digits="2"
    label="Gamma:"
    label_width="185"
    layout="topleft"
    left="30"
    name="gamma"
    min_val="0"
    max_val="2"
    increment="0.01"
    top_delta="16"
    width="332" />
  <text
    type="string"
    length="1"
    follows="left|top"
    height="16"
    layout="topleft"
    left="30"
    name="(brightness, lower is brighter)"
    top_delta="16"
    width="260">
      (0 = default brightness, lower = brighter)
  </text>

  <check_box
    control_name="RenderAnisotropic"
    height="16"
    label="Anisotropic Filtering (slower when enabled)"
    layout="topleft"
    left="30"
    name="ani"
    top_delta="16"
    width="256" />

  <check_box
    control_name="RenderVBOEnable"
    height="16"
    initial_value="true"
    label="Enable OpenGL Vertex Buffer Objects"
    layout="topleft"
    left="30"
    top_delta="16"
    name="vbo"
    tool_tip="Enabling this on modern hardware gives a performance gain.  However, older hardware often has poor implementations of VBOs and you may get crashes when this is enabled."
    width="315" />

  <check_box
    control_name="RenderCompressTextures"
    height="16"
    initial_value="true"
    label="Enable Texture Compression (requires restart)"
    layout="topleft"
    left="30"
    top_delta="16"
    name="texture compression"
    tool_tip="Compresses textures in video memory, allowing for higher resolution textures to be loaded at the cost of some color quality."
    width="315" />

  <check_box
    control_name="RenderHiDPI"
    height="16"
    initial_value="true"
    label="Enable support for HiDPI displays (requires restart)"
    layout="topleft"
    left="30"
    top_delta="16"
    name="use HiDPI"
    tool_tip="Enable OpenGL for High-Resolution Drawing."
    width="315" />

  <text
    type="string"
    length="1"
    follows="left|top"
    height="20"
    layout="topleft"
    left="30"
    name="antialiasing label"
    top_delta="20"
    width="100">
      Antialiasing:
  </text>
  <combo_box
    control_name="RenderFSAASamples"
    height="20"
    initial_value="false"
    label="Antialiasing"
    layout="topleft"
    left_pad="40"
    name="fsaa"
    top_delta="0"
    width="90">
    <combo_box.item
      label="Disabled"
      name="FSAADisabled"
      value="0" />
    <combo_box.item
      label="2x"
      name="2x"
      value="2" />
    <combo_box.item
     label="4x"
     name="4x"
     value="4" />
    <combo_box.item
     label="8x"
     name="8x"
     value="8" />
    <combo_box.item
     label="16x"
     name="16x"
     value="16" />
  </combo_box>
  <text
    type="string"
    length="1"
    follows="left|top"
    height="16"
    layout="topleft"
    left_pad="10"
    name="antialiasing restart"
    top_delta="0"
    width="130">
     (requires restart)
  </text>
   <view_border
      bevel_style="in"
      height="322"
      layout="topleft"
      left="385"
      name="vert_border"
      top="16"      
      width="0"/>
  <text
    type="string"
    length="1"
    follows="left|top"
    height="16"
    layout="topleft"
    name="MeshText"
    top_delta="20"
    left="400"
  	top="21"
    width="128">
     Mesh
  </text>

  <slider
    control_name="RenderTerrainLODFactor"
    follows="left|top"
    height="16"
    increment="0.125"
    initial_value="160"
    label="Terrain Mesh Detail:"
    label_width="185"
    layout="topleft"
    left="420"
    min_val="1"
    max_val="2"
    name="TerrainMeshDetail"
    show_text="false"
    top_delta="16"
    width="300">
    <slider.commit_callback
      function="Pref.UpdateSliderText"
      parameter="TerrainMeshDetailText" />
  </slider>
  <text
    type="string"
    length="1"
    follows="left|top"
    height="16"
    layout="topleft"
    name="TerrainMeshDetailText"
    text_readonly_color="LabelDisabledColor"
    top_delta="0"
    left_delta="304"
    width="65">
       Low
  </text>

  <slider
    control_name="RenderTreeLODFactor"
    follows="left|top"
    height="16"
    increment="0.125"
    initial_value="160"
    label="Trees:"
    label_width="185"
    layout="topleft"
    left="420"
    name="TreeMeshDetail"
    show_text="false"
    top_delta="16"
    width="300">
    <slider.commit_callback
      function="Pref.UpdateSliderText"
      parameter="TreeMeshDetailText" />
  </slider>
  <text
    type="string"
    length="1"
    follows="left|top"
    height="16"
    layout="topleft"
    name="TreeMeshDetailText"
    top_delta="0"
    left_delta="304"
    width="65">
       Low
  </text>

  <slider
    control_name="RenderVolumeLODFactor"
    follows="left|top"
    height="16"
    increment="0.125"
    initial_value="160"
    label="Objects:"
    label_width="185"
    layout="topleft"
    left="420"
    min_val="1"
    max_val="2"
    name="ObjectMeshDetail"
    show_text="false"
    top_delta="16"
    width="300">
    <slider.commit_callback
      function="Pref.UpdateSliderText"
      parameter="ObjectMeshDetailText" />
  </slider>
  <text
    type="string"
    length="1"
    follows="left|top"
    height="16"
    layout="topleft"
    name="ObjectMeshDetailText"
    top_delta="0"
    left_delta="304"
    width="65">
       Low
  </text>

  <slider
    control_name="RenderFlexTimeFactor"
    follows="left|top"
    height="16"
    initial_value="160"
    label="Flexiprims:"
    label_width="185"
    layout="topleft"
    left="420"
    name="FlexibleMeshDetail"
    show_text="false"
    top_delta="16"
    width="300">
    <slider.commit_callback
   function="Pref.UpdateSliderText"
      parameter="FlexibleMeshDetailText" />
  </slider>
  <text
    type="string"
    length="1"
    follows="left|top"
    height="16"
    layout="topleft"
    name="FlexibleMeshDetailText"
    top_delta="0"
    left_delta="304"
    width="65">
       Low
  </text>
  
  <text
    type="string"
    length="1"
    follows="left|top"
    height="16"
    layout="topleft"
    name="ShadersText"
    top_delta="20"
    left="400"
    width="128">
     Shaders
  </text>

  <check_box
    control_name="RenderTransparentWater"
    height="16"
    initial_value="true"
    label="Transparent Water"
    layout="topleft"
    left="420"
    name="TransparentWater"
    top_delta="16"
    width="300" />

  <check_box
    control_name="RenderObjectBump"
    height="16"
    initial_value="true"
    label="Bump mapping and shiny"
    layout="topleft"
    left="420"
    name="BumpShiny"
    top_delta="16"
    width="300">
    <check_box.commit_callback
      function="Pref.VertexShaderEnable" />
  </check_box>

  <check_box
    control_name="RenderLocalLights"
    height="16"
    initial_value="true"
    label="Local Lights"
    layout="topleft"
    left="420"
    name="LocalLights"
    top_delta="16"
    width="300" />

  <check_box
    control_name="VertexShaderEnable"
    height="16"
    initial_value="true"
    label="Basic shaders"
    layout="topleft"
    left="420"
    name="BasicShaders"
    tool_tip="Disabling this option may prevent some graphics card drivers from crashing"
    top_delta="16"
    width="300">
    <check_box.commit_callback
      function="Pref.VertexShaderEnable" />
  </check_box>

  <slider
    control_name="RenderTerrainDetail"
    follows="left|top"
    height="16"
    label="Terrain Detail:"
    label_width="165"
    layout="topleft"
    left="440"
    show_text="false"
    initial_value="0"
    increment="1"
    min_val="0"
    max_val="1"
    name="TerrainDetail"
    top_delta="16"
    width="280" >
    <slider.commit_callback
      function="Pref.UpdateSliderText"
      parameter="TerrainDetail" />
  </slider>
  <text
    type="string"
    length="1"
    follows="left|top"
    height="16"
    layout="topleft"
    top_delta="0"
    left_delta="284"
    name="TerrainDetailText"
    text_readonly_color="LabelDisabledColor"
    width="65">
       Low
  </text>

  <check_box
    control_name="RenderAvatarVP"
    height="16"
    initial_value="true"
    label="Avatar Hardware skinning"
    layout="topleft"
    left="440"
    name="AvatarVertexProgram"
    top_delta="16"
    width="280">
    <check_box.commit_callback
      function="Pref.VertexShaderEnable" />
  </check_box>

  <check_box
    control_name="RenderAvatarCloth"
    height="16"
    initial_value="true"
    label="Avatar cloth"
    layout="topleft"
    left="440"
    name="AvatarCloth"
    top_delta="16"
    width="280" />

  <text
    type="string"
    length="1"
    follows="left|top"
    height="16"
    layout="topleft"
    name="ReflectionsText"
    text_readonly_color="LabelDisabledColor"
    top_delta="16"
    left="440"
    width="128">
       Water Reflections:
  </text>
  <combo_box
    control_name="RenderReflectionDetail"
    height="18"
    layout="topleft"
    left_delta="170"
    top_delta="0"
    name="Reflections"
    width="150">
      <combo_box.item
        label="Minimal"
        name="0"
        value="0"/>
      <combo_box.item
        label="Terrain and trees"
        name="1"
        value="1"/>
      <combo_box.item
        label="All static objects"
        name="2"
        value="2"/>
      <combo_box.item
        label="All avatars and objects"
        name="3"
        value="3"/>
      <combo_box.item
        label="Everything"
        name="4"
        value="4"/>
  </combo_box>

  <check_box
    control_name="WindLightUseAtmosShaders"
    height="16"
    initial_value="true"
    label="Atmospheric shaders"
    layout="topleft"
    left="440"
    name="WindLightUseAtmosShaders"
    top_delta="16"
    width="280">
    <check_box.commit_callback
      function="Pref.VertexShaderEnable" />
  </check_box>

  <slider
    control_name="WLSkyDetail"
    decimal_digits="0"
    follows="left|top"
    height="16"
    increment="8"
    initial_value="160"
    label="Sky:"
    label_width="145"
    layout="topleft"
    left="460"
    min_val="16"
    max_val="128"
    name="SkyMeshDetail"
    show_text="false"
    top_delta="16"
    width="260">
    <slider.commit_callback
      function="Pref.UpdateSliderText"
      parameter="SkyMeshDetailText" />
  </slider>
  <text
    type="string"
    length="1"
    follows="left|top"
    height="16"
    layout="topleft"
    left_delta="264"
    name="SkyMeshDetailText"
    text_readonly_color="LabelDisabledColor"
    top_delta="0"
    width="65">
       Low
  </text>

  <check_box
    control_name="RenderDeferred"
    height="16"
    initial_value="true"
    label="Advanced Lighting Model"
    layout="topleft"
    left="460"
    name="UseLightShaders"
    top_delta="16"
    width="260">
    <check_box.commit_callback
      function="Pref.VertexShaderEnable" />
  </check_box>

  <check_box
    control_name="RenderDeferredSSAO"
    height="16"
    initial_value="true"
    label="Ambient Occlusion"
    layout="topleft"
    left="480"
    name="UseSSAO"
    top_delta="16"
    width="240">
    <check_box.commit_callback
      function="Pref.VertexShaderEnable" />
  </check_box>

  <check_box
    control_name="RenderDepthOfField"
    height="16"
    initial_value="true"
    label="Depth of Field"
    layout="topleft"
    left="480"
    name="UseDoF"
    top_delta="16"
    width="240">
    <check_box.commit_callback
      function="Pref.VertexShaderEnable" />
  </check_box>

  <text
    type="string"
    length="1"
    follows="left|top"
    height="16"
    layout="topleft"
    left="480"
    name="RenderShadowDetailText"
    text_readonly_color="LabelDisabledColor"
    top_delta="16"
    width="128">
      Shadows:
  </text>
  <combo_box
   control_name="RenderShadowDetail"
   height="18"
   layout="topleft"
   left_delta="130"
   top_delta="0" 
   name="ShadowDetail"
   width="150">
     <combo_box.item
       label="None"
       name="0"
       value="0"/>
     <combo_box.item
       label="Sun/Moon"
       name="1"
       value="1"/>
     <combo_box.item
       label="Sun/Moon + Projectors"
       name="2"
       value="2"/>
  </combo_box>
  
<!-- End of Advanced Settings block -->
	<view_border
      bevel_style="in"
      height="0"
      layout="topleft"
      left="13"
      name="horiz_border"
      top_pad="5"
      top_delta="5"
      width="774"/>
  <button
    follows="top|left"
    height="23"
    label="Reset to recommended settings"
    layout="topleft"
    left="20"
    name="Defaults"
    top_delta="10"
    width="210">
    <button.commit_callback
      function="Pref.HardwareDefaults" />
  </button>

  <button
    follows="right|bottom"
    height="23"
    label="OK"
    label_selected="OK"
    layout="topleft"
    right="-115"
    name="OK"
    top_delta="0"
    width="80">
      <button.commit_callback
        function="Pref.OK"
        parameter="closeadvanced" />
   </button>

   <button
    follows="right|bottom"
    height="23"
    label="Cancel"
    label_selected="Cancel"
    layout="topleft"
    left_pad="5"
    right="-20"
    name="Cancel"
    top_delta="0"
    width="80" >
      <button.commit_callback
        function="Pref.Cancel"
        parameter="closeadvanced" />
   </button>

<!-- These two check boxes are dummies and will never be displayed.  They are here so the control variables
are saved in a preset file. -->
  <check_box
    control_name="RenderAvatarMaxComplexity"
    visible="false"
    height="0"
    label="RenderAvatarMaxComplexity"
    layout="topleft"
    left="0"
    name="RenderAvatarMaxComplexity"
    top_delta="0"
    width="0">
  </check_box>

  <check_box
    control_name="RenderAvatarMaxNonImpostors"
    visible="false"
    height="0"
    label="RenderAvatarMaxNonImpostors"
    layout="topleft"
    left="0"
    name="RenderAvatarMaxNonImpostors"
    top_delta="0"
    width="0">
  </check_box>
</floater>
