Index: GTP/trunk/App/Demos/Illum/IBRBillboardCloudTrees/RenderMonkey/IndirectTexturingShadowsEffect/IndirectTexturingShadowsEffect.rfx
===================================================================
--- GTP/trunk/App/Demos/Illum/IBRBillboardCloudTrees/RenderMonkey/IndirectTexturingShadowsEffect/IndirectTexturingShadowsEffect.rfx	(revision 889)
+++ GTP/trunk/App/Demos/Illum/IBRBillboardCloudTrees/RenderMonkey/IndirectTexturingShadowsEffect/IndirectTexturingShadowsEffect.rfx	(revision 952)
@@ -805,5 +805,5 @@
     <RmRegistryBranch NAME="WORKSPACE" API="" XML_VERSION="RenderMonkey 1.6">
      <RmStringVariable NAME="LAST_SAVE" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
-3/5/2006 12:31:32]]></RmTextDataBlock></RmStringVariable>
+12/5/2006 9:53:25]]></RmTextDataBlock></RmStringVariable>
      <RmStringVariable NAME="VERSION" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
 RenderMonkey Version 1.6 (build 91)]]></RmTextDataBlock></RmStringVariable>
@@ -838,7 +838,7 @@
        <RmRegistryBranch NAME="Disassembly" API="" XML_VERSION="RenderMonkey 1.6"/>
        <RmStringVariable NAME="Editing Shader" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
-Vertex Shader]]></RmTextDataBlock></RmStringVariable>
+Pixel Shader]]></RmTextDataBlock></RmStringVariable>
        <RmStringVariable NAME="Editing Pass" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
-DepthTrunkPass]]></RmTextDataBlock></RmStringVariable>
+LeavesIndirectTexturingPass]]></RmTextDataBlock></RmStringVariable>
        <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="58" MIN="-10" MAX="10" CLAMP="FALSE"/>
        <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="696" MIN="-10" MAX="10" CLAMP="FALSE"/>
@@ -877,5 +877,5 @@
      <RmRegistryBranch NAME="RmTextureObjectEditor" API="" XML_VERSION="RenderMonkey 1.6">
       <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.6">
-       <RmRegistryBranch NAME="Effect Workspace.Shadow Effects.IndirectTexturingShadowsEffect.LeavesIndirectTexturingPass.indirectTexture" API="" XML_VERSION="RenderMonkey 1.6"/>
+       <RmRegistryBranch NAME="Effect Workspace.Shadow Effects.IndirectTexturingShadowsEffect.LeavesIndirectTexturingPass.sourceTexture" API="" XML_VERSION="RenderMonkey 1.6"/>
       </RmRegistryBranch>
       <RmRegistryBranch NAME="NodeRepository" API="" XML_VERSION="RenderMonkey 1.6">
@@ -1480,5 +1480,5 @@
       float2 newcoord = (float2(1.0, 1.0) - value.zw) + ((coords * sourceTextureSize) / sqrtNumSamples);
       ocolor = float4(tex2D(sourceTexture, newcoord).xyzw);
-      ocolor = float4(Ka * ocolor.xyz + (Kd * diffuse * ocolor.xyz + Ks * specular) * shadow, ocolor.w);
+      ocolor = float4(Ka * ocolor.xyz + (Kd * diffuse * ocolor.xyz + Ks * specular)  * shadow, ocolor.w);
    }   
 
@@ -1618,4 +1618,7 @@
      <RmTextureObject NAME="sourceTexture" API="D3D" STATE_INDEX="3" VERTEX_TEXTURE="FALSE">
       <RmTextureReference NAME="sourceTexture" API=""/>
+      <RmState NAME="D3DSAMP_MAGFILTER" API="D3D" STATE="5" VALUE="2" USAGE="SAMPLER_STATE"/>
+      <RmState NAME="D3DSAMP_MINFILTER" API="D3D" STATE="6" VALUE="2" USAGE="SAMPLER_STATE"/>
+      <RmState NAME="D3DSAMP_MIPFILTER" API="D3D" STATE="7" VALUE="0" USAGE="SAMPLER_STATE"/>
      </RmTextureObject>
     </RmPass>
@@ -1809,8 +1812,8 @@
    <RmModelData NAME="Sphere" API="" FILE_NAME=".\Sphere.3ds" ORIENTATION="0"/>
   </RmEffectGroup>
-  <RmVectorVariable NAME="view_position" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="ViewPosition" VALUE_0="-35.980434" VALUE_1="-195.499359" VALUE_2="-22.031876" VALUE_3="1.000000" MIN="-10.000000" MAX="10.000000" CLAMP="FALSE" NORMALIZE="FALSE"/>
-  <RmMatrixVariable NAME="view_proj_matrix" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="ViewProjection" VALUE_0="1.166235" VALUE_1="-0.217104" VALUE_2="0.021876" VALUE_3="-0.000005" VALUE_4="0.092175" VALUE_5="0.253403" VALUE_6="-2.399108" VALUE_7="-0.000157" VALUE_8="0.180082" VALUE_9="0.978475" VALUE_10="0.110270" VALUE_11="199.199158" VALUE_12="0.179902" VALUE_13="0.977497" VALUE_14="0.110159" VALUE_15="199.999969"/>
+  <RmVectorVariable NAME="view_position" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="ViewPosition" VALUE_0="-71.222672" VALUE_1="-128.383163" VALUE_2="-17.588064" VALUE_3="1.000000" MIN="-10.000000" MAX="10.000000" CLAMP="FALSE" NORMALIZE="FALSE"/>
+  <RmMatrixVariable NAME="view_proj_matrix" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="ViewProjection" VALUE_0="1.016186" VALUE_1="-0.587463" VALUE_2="0.173118" VALUE_3="0.000000" VALUE_4="0.448028" VALUE_5="0.076275" VALUE_6="-2.371050" VALUE_7="-0.000046" VALUE_8="0.482154" VALUE_9="0.869111" VALUE_10="0.119065" VALUE_11="147.012634" VALUE_12="0.481672" VALUE_13="0.868242" VALUE_14="0.118946" VALUE_15="147.865631"/>
   <RmMatrixVariable NAME="proj_matrix" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="Projection" VALUE_0="1.186472" VALUE_1="0.000000" VALUE_2="0.000000" VALUE_3="0.000000" VALUE_4="0.000000" VALUE_5="2.414213" VALUE_6="0.000000" VALUE_7="0.000000" VALUE_8="0.000000" VALUE_9="0.000000" VALUE_10="1.001001" VALUE_11="-1.001001" VALUE_12="0.000000" VALUE_13="0.000000" VALUE_14="1.000000" VALUE_15="0.000000"/>
-  <RmFloatVariable NAME="time_0_X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="Time0_X" VALUE="103.072510" MIN="-1.000000" MAX="1.000000" CLAMP="FALSE"/>
+  <RmFloatVariable NAME="time_0_X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="Time0_X" VALUE="87.033546" MIN="-1.000000" MAX="1.000000" CLAMP="FALSE"/>
  </RmEffectWorkspace>
 </RENDER_MONKEY>
Index: GTP/trunk/App/Demos/Illum/IBRBillboardCloudTrees/RenderMonkey/IndirectTexturingEffect/IndirectTexturingEffect.rfx
===================================================================
--- GTP/trunk/App/Demos/Illum/IBRBillboardCloudTrees/RenderMonkey/IndirectTexturingEffect/IndirectTexturingEffect.rfx	(revision 888)
+++ GTP/trunk/App/Demos/Illum/IBRBillboardCloudTrees/RenderMonkey/IndirectTexturingEffect/IndirectTexturingEffect.rfx	(revision 952)
@@ -805,5 +805,5 @@
     <RmRegistryBranch NAME="WORKSPACE" API="" XML_VERSION="RenderMonkey 1.6">
      <RmStringVariable NAME="LAST_SAVE" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
-3/5/2006 12:32:7]]></RmTextDataBlock></RmStringVariable>
+12/5/2006 9:47:34]]></RmTextDataBlock></RmStringVariable>
      <RmStringVariable NAME="VERSION" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
 RenderMonkey Version 1.6 (build 91)]]></RmTextDataBlock></RmStringVariable>
@@ -823,5 +823,5 @@
         <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="350" MIN="-10" MAX="10" CLAMP="FALSE"/>
         <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="350" MIN="-10" MAX="10" CLAMP="FALSE"/>
-        <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="3" MIN="-10" MAX="10" CLAMP="FALSE"/>
+        <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
         <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
         <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
@@ -869,4 +869,5 @@
       <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.6">
        <RmRegistryBranch NAME="Effect Workspace.IndirectTexturing Effects.indirectTexturingGL.IndirectTexturing.sourceTexture" API="" XML_VERSION="RenderMonkey 1.6"/>
+       <RmRegistryBranch NAME="Effect Workspace.IndirectTexturing Effects.indirectTexturingDX.IndirectTexturing.sourceTexture" API="" XML_VERSION="RenderMonkey 1.6"/>
       </RmRegistryBranch>
       <RmRegistryBranch NAME="NodeRepository" API="" XML_VERSION="RenderMonkey 1.6">
@@ -887,5 +888,5 @@
         <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="255" MIN="-10" MAX="10" CLAMP="FALSE"/>
         <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
-        <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+        <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
         <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
         <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
@@ -907,9 +908,9 @@
 Pixel Shader]]></RmTextDataBlock></RmStringVariable>
        <RmStringVariable NAME="Editing Pass" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
-TrunkPass]]></RmTextDataBlock></RmStringVariable>
+IndirectTexturing]]></RmTextDataBlock></RmStringVariable>
        <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="29" MIN="-10" MAX="10" CLAMP="FALSE"/>
        <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="696" MIN="-10" MAX="10" CLAMP="FALSE"/>
        <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="255" MIN="-10" MAX="10" CLAMP="FALSE"/>
-       <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+       <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="3" MIN="-10" MAX="10" CLAMP="FALSE"/>
        <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
        <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
@@ -1112,5 +1113,5 @@
       ocolor = float4(tex2D(sourceTexture, newcoord).xyzw);
    }
-
+ 
    return  ocolor;
 }]]></RmShaderCode>
@@ -1155,4 +1156,7 @@
      <RmTextureObject NAME="sourceTexture" API="D3D" STATE_INDEX="1" VERTEX_TEXTURE="FALSE">
       <RmTextureReference NAME="sourceTexture" API=""/>
+      <RmState NAME="D3DSAMP_MAGFILTER" API="D3D" STATE="5" VALUE="2" USAGE="SAMPLER_STATE"/>
+      <RmState NAME="D3DSAMP_MIPFILTER" API="D3D" STATE="7" VALUE="0" USAGE="SAMPLER_STATE"/>
+      <RmState NAME="D3DSAMP_MINFILTER" API="D3D" STATE="6" VALUE="2" USAGE="SAMPLER_STATE"/>
      </RmTextureObject>
     </RmPass>
@@ -1316,5 +1320,5 @@
    <RmFloatVariable NAME="epsilonX" API="" ARTIST_EDITABLE="TRUE" VARIABLE_SEMANTIC="" VALUE="-0.200000" MIN="-1.000000" MAX="0.000000" CLAMP="FALSE"/>
    <RmFloatVariable NAME="sourceTextureSize" API="" ARTIST_EDITABLE="TRUE" VARIABLE_SEMANTIC="" VALUE="16.000000" MIN="-1.000000" MAX="1.000000" CLAMP="FALSE"/>
-   <RmMatrixVariable NAME="worldviewproj" API="" ARTIST_EDITABLE="TRUE" VARIABLE_SEMANTIC="WorldViewProjection" VALUE_0="-1.141796" VALUE_1="-0.095821" VALUE_2="-0.017939" VALUE_3="0.000000" VALUE_4="0.090956" VALUE_5="-0.648809" VALUE_6="-2.323618" VALUE_7="-0.000212" VALUE_8="0.076348" VALUE_9="-0.960535" VALUE_10="0.271193" VALUE_11="199.199448" VALUE_12="0.076272" VALUE_13="-0.959575" VALUE_14="0.270922" VALUE_15="200.000259"/>
+   <RmMatrixVariable NAME="worldviewproj" API="" ARTIST_EDITABLE="TRUE" VARIABLE_SEMANTIC="WorldViewProjection" VALUE_0="-0.927060" VALUE_1="-1.922040" VALUE_2="-0.778076" VALUE_3="0.000000" VALUE_4="0.351899" VALUE_5="0.748449" VALUE_6="-2.268131" VALUE_7="0.000068" VALUE_8="0.902105" VALUE_9="-0.433820" VALUE_10="-0.003194" VALUE_11="55.716743" VALUE_12="0.901203" VALUE_13="-0.433386" VALUE_14="-0.003191" VALUE_15="56.661026"/>
    <RmFloatVariable NAME="numSamples" API="" ARTIST_EDITABLE="TRUE" VARIABLE_SEMANTIC="" VALUE="16.000000" MIN="-1.000000" MAX="1.000000" CLAMP="FALSE"/>
    <RmFloatVariable NAME="sqrtNumSamples" API="" ARTIST_EDITABLE="TRUE" VARIABLE_SEMANTIC="" VALUE="4.000000" MIN="-1.000000" MAX="1.000000" CLAMP="FALSE"/>
