Revision: 8906
          http://playerstage.svn.sourceforge.net/playerstage/?rev=8906&view=rev
Author:   natepak
Date:     2010-09-15 15:42:21 +0000 (Wed, 15 Sep 2010)

Log Message:
-----------
Updates

Modified Paths:
--------------
    code/gazebo/branches/wx/Media/materials/programs/CMakeLists.txt
    code/gazebo/branches/wx/Media/materials/programs/pssm_vsm_caster_vp.glsl
    code/gazebo/branches/wx/Media/materials/scripts/CMakeLists.txt
    code/gazebo/branches/wx/Media/materials/scripts/Gazebo.material

Added Paths:
-----------
    code/gazebo/branches/wx/Media/materials/programs/pssm_vsm_receiver_fp.glsl
    code/gazebo/branches/wx/Media/materials/programs/pssm_vsm_receiver_vp.glsl
    code/gazebo/branches/wx/Media/materials/scripts/shadow_receiver.material

Removed Paths:
-------------
    code/gazebo/branches/wx/Media/materials/programs/pssm_vsm_diffuse_fp.glsl
    
code/gazebo/branches/wx/Media/materials/programs/pssm_vsm_diffuse_fp.glsl.bak
    code/gazebo/branches/wx/Media/materials/programs/pssm_vsm_diffuse_vp.glsl
    
code/gazebo/branches/wx/Media/materials/programs/pssm_vsm_diffuse_vp.glsl.bak
    code/gazebo/branches/wx/Media/materials/scripts/diffuse.material
    code/gazebo/branches/wx/Media/materials/scripts/pssm.material
    code/gazebo/branches/wx/Media/materials/scripts/pssm.material.old
    code/gazebo/branches/wx/Media/materials/scripts/pssm_ogre.material

Modified: code/gazebo/branches/wx/Media/materials/programs/CMakeLists.txt
===================================================================
--- code/gazebo/branches/wx/Media/materials/programs/CMakeLists.txt     
2010-09-15 02:29:40 UTC (rev 8905)
+++ code/gazebo/branches/wx/Media/materials/programs/CMakeLists.txt     
2010-09-15 15:42:21 UTC (rev 8906)
@@ -1,18 +1,9 @@
-SET (files PointLight.vert 
-           PointLight.frag 
-           DepthMap.frag 
-           DepthMap.vert 
-           pssm_vsm_caster_fp.glsl
+SET (files pssm_vsm_caster_fp.glsl
            pssm_vsm_caster_vp.glsl
-           pssm_vsm_diffuse_fp.glsl
-           pssm_vsm_diffuse_vp.glsl
-           DepthShadowmapCasterFp.glsl
-           DepthShadowmapCasterVp.glsl
-           DepthShadowmapReceiverFp.glsl
-           DepthShadowmapReceiverVp.glsl
+           pssm_vsm_receiver_fp.glsl
+           pssm_vsm_receiver_vp.glsl
            AmbientOneTexture.glsl
-           blur.glsl
-           )
+) 
 
 INSTALL(FILES ${files} DESTINATION 
${CMAKE_INSTALL_PREFIX}/share/gazebo/Media/materials/programs/)
 

Modified: 
code/gazebo/branches/wx/Media/materials/programs/pssm_vsm_caster_vp.glsl
===================================================================
--- code/gazebo/branches/wx/Media/materials/programs/pssm_vsm_caster_vp.glsl    
2010-09-15 02:29:40 UTC (rev 8905)
+++ code/gazebo/branches/wx/Media/materials/programs/pssm_vsm_caster_vp.glsl    
2010-09-15 15:42:21 UTC (rev 8906)
@@ -1,4 +1,3 @@
-uniform mat4 pMat;
 uniform mat4 wvMat;
 
 varying vec4 vertexDepth;
@@ -7,8 +6,5 @@
 {
   vertexDepth = wvMat * gl_Vertex;
 
-  //gl_Position = (pMat * vertexDepth).xyzw;
-
-  // pass the vertex position, transforming it to clip space
   gl_Position = ftransform();
 }

Deleted: 
code/gazebo/branches/wx/Media/materials/programs/pssm_vsm_diffuse_fp.glsl
===================================================================
--- code/gazebo/branches/wx/Media/materials/programs/pssm_vsm_diffuse_fp.glsl   
2010-09-15 02:29:40 UTC (rev 8905)
+++ code/gazebo/branches/wx/Media/materials/programs/pssm_vsm_diffuse_fp.glsl   
2010-09-15 15:42:21 UTC (rev 8906)
@@ -1,89 +0,0 @@
-uniform vec3 lightDif0;
-uniform vec4 lightPos0;
-uniform vec4 lightAtt0;
-uniform vec4 invSMSize;
-uniform vec4 depthRange;
-uniform vec4 spotlightParams;
-uniform sampler2D dMap;
-uniform sampler2D shadowMap;
-
-varying vec4 vertexWorldPosition;
-varying vec4 lightPosition0;
-varying vec3 vertexNormal;
-varying vec3 sdir;
-
-vec2 btex2D_rg(sampler2D map, vec2 uv, float radius, vec2 offset) 
-{
-  // simple 3x3 filter
-  vec2 o = offset;
-  vec2 c = texture2D(map, uv.xy).rg; // center
-  c +=     texture2D(map, uv.xy - o.xy).rg; // top left
-  c +=     texture2D(map, uv.xy + o.xy).rg; // bottom right
-  c +=     texture2D(map, vec2(uv.x - o.x, uv.y)).rg; // left
-  c +=     texture2D(map, vec2(uv.x + o.x, uv.y)).rg; // right
-  c +=     texture2D(map, vec2(uv.x, uv.y + o.y)).rg; // bottom
-  c +=     texture2D(map, vec2(uv.x, uv.y - o.y)).rg; // top
-  c +=     texture2D(map, vec2(uv.x - o.x, uv.y + o.y)).rg; // bottom left
-  c +=     texture2D(map, vec2(uv.x + o.x, uv.y - o.y)).rg; // top right
-  return c / 9.0;
-}
-
-float shadow(in sampler2D shadowMap, in vec4 shadowMapPos, float ourDepth, 
float radius, vec2 offset) 
-{
-  vec2 suv = shadowMapPos.xy / shadowMapPos.w;
-
-  vec2 moments = btex2D_rg(shadowMap, suv, radius, offset);
-
-  float litFactor = (ourDepth <= moments.x ? 1.0 : 0.0);
-
-  // standard variance shadow mapping code
-  float E_x2 = moments.y;
-  float Ex_2 = moments.x * moments.x;
-  float vsmEpsilon = 0.0001;
-  float variance = min(max(E_x2 - Ex_2, 0.0) + vsmEpsilon, 1.0);
-  float m_d = moments.x - ourDepth;
-  float denom = (variance + m_d * m_d);
-  float p = variance / denom;
-
-  return smoothstep(0.4, 1.0, max(litFactor, p));
-}
-
-void main()
-{
-  // direction
-  vec3 ld0 = normalize(lightPos0.xyz - (lightPos0.w * 
vertexWorldPosition.xyz));
-
-  // attenuation
-  float ila = length(lightPos0.xyz - vertexWorldPosition.xyz) / lightAtt0.r;
-  ila *= ila; // quadratic falloff
-  float la = 1.0 - ila;
-
-  vec3 normal = normalize(vertexNormal);
-
-  float LdotN0 = max(dot(ld0, normal), 0.0);
-  vec4 difTex = texture2D(dMap, gl_TexCoord[0].xy);
-
-  // calculate the spotlight effect
-  float spot = dot(ld0, normalize(-sdir)); // angle between spotlight dir and 
actual dir
-  spot = clamp((spot - spotlightParams.y) / (spotlightParams.x - 
spotlightParams.y),0.0,1.0);
-
-  vec3 light0C =
-    //   N . L    LIGHT DIF   TEX DIF       ATT
-    //(LdotN0 * lightDif0 * difTex.xyz) * la * spot
-    (LdotN0 * lightDif0 * difTex.xyz) * la * spot *
-    shadow(
-        // pass in the shadow map
-        shadowMap,
-        // the calculated shadow position in the shadow map
-        lightPosition0,
-        // distance to light, done just as in the caster shader
-        (length(lightPos0.xyz - vertexWorldPosition.xyz) - depthRange.x) * 
depthRange.w,
-        // radius to blur (we discussed)
-        3.0,
-        // inverse shadow map size so we know how much to move when blurring
-        invSMSize.xy);
-
-  gl_FragColor = vec4(light0C, 1.0);
-  
-}
-

Deleted: 
code/gazebo/branches/wx/Media/materials/programs/pssm_vsm_diffuse_fp.glsl.bak
===================================================================
--- 
code/gazebo/branches/wx/Media/materials/programs/pssm_vsm_diffuse_fp.glsl.bak   
    2010-09-15 02:29:40 UTC (rev 8905)
+++ 
code/gazebo/branches/wx/Media/materials/programs/pssm_vsm_diffuse_fp.glsl.bak   
    2010-09-15 15:42:21 UTC (rev 8906)
@@ -1,89 +0,0 @@
-uniform sampler2D shadowMap0;
-uniform sampler2D shadowMap1;
-uniform sampler2D shadowMap2; uniform sampler2D diffuseMap0;
-
-uniform vec4 invShadowMapSize0;
-uniform vec4 invShadowMapSize1;
-uniform vec4 invShadowMapSize2;
-uniform vec4 pssmSplitPoints;
-uniform vec4 depthRange0;
-uniform vec4 depthRange1;
-uniform vec4 depthRange2;
-uniform vec4 lightPos0;
-
-varying vec3  vertexNormal;
-varying vec4  vertexWorldPosition;
-varying vec4  lightPosition0;
-varying vec4  lightPosition1;
-varying vec4  lightPosition2;
-varying float shadowDistance;
-
-float shadowPCF(in sampler2D shadowMap, in vec4 shadowMapPos, const in vec2 
offset, float depth)
-{
-   shadowMapPos = shadowMapPos / shadowMapPos.w;
-   vec2 uv = shadowMapPos.xy;
-   
-   vec2 o = offset;
-   vec2 c = texture2D(shadowMap, uv.xy).rg; // center
-    //vec2 c = texture2D(shadowMap, uv.xy - o.xy).rg; // top left
-    //c += texture2D(shadowMap, uv.xy + o.xy).rg; // bottom right
-    ////c += texture2D(shadowMap, vec2(uv.x - o.x, uv.y)).rg; // left
-    ////c += texture2D(shadowMap, vec2(uv.x + o.x, uv.y)).rg; // right
-    ////c += texture2D(shadowMap, vec2(uv.x, uv.y + o.y)).rg; // bottom
-    ////c += texture2D(shadowMap, vec2(uv.x, uv.y - o.y)).rg; // top
-    //c += texture2D(shadowMap, vec2(uv.x - o.x, uv.y + o.y)).rg; // bottom 
left
-    //c += texture2D(shadowMap, vec2(uv.x + o.x, uv.y - o.y)).rg; // top right
-    //c /= 4.0;
-       
-    vec2 moments = c;
-    float litFactor = (depth <= moments.x ? 1.0 : 0.0);
-
-    // standard variance shadow mapping code
-    float E_x2 = moments.y;
-    float Ex_2 = moments.x * moments.x;
-    float vsmEpsilon = 0.0001;
-    float variance = min(max(E_x2 - Ex_2, 0.0) + vsmEpsilon, 1.0);
-    float m_d = (moments.x - depth);
-    float p = variance / (variance + m_d * m_d);
-
-    return smoothstep(0.4, 1.0, max(litFactor, p));
-}
-
-void main()
-{
-  vec3 lightDir0 = normalize(lightPos0.xyz - (lightPos0.w * 
vertexWorldPosition.xyz));
-  vec3 normalizedNormal   = normalize(vertexNormal);
-  float diffuseAmount = max(dot(normalizedNormal, lightDir0), 0.0);
-
-  // calculate shadow
-  float shadowAmount = 1.0;
-  vec4 shadowColor = vec4(0.0, 0.0, 0.0, 1.0);
-
-  if (shadowDistance <= pssmSplitPoints.y) {
-    float depth = (length(lightPos0.xyz - vertexWorldPosition.xyz) - 
depthRange0.x) * depthRange0.w;
-
-    shadowAmount = shadowPCF(shadowMap0, lightPosition0, invShadowMapSize0.xy, 
depth);
-    shadowColor = vec4(1.0, 0, 0, 1.0);
-  }
-  else if (shadowDistance <= pssmSplitPoints.z) {
-    float depth = (length(lightPos0.xyz - vertexWorldPosition.xyz) - 
depthRange1.x) * depthRange1.w;
-
-    shadowAmount = shadowPCF(shadowMap1, lightPosition1, invShadowMapSize1.xy, 
depth);
-    shadowColor = vec4(0.0, 1.0, 0, 1.0);       
-  }
-  else {
-    float depth = (length(lightPos0.xyz - vertexWorldPosition.xyz) - 
depthRange2.x) * depthRange2.w;
-
-    shadowAmount = shadowPCF(shadowMap2, lightPosition2, invShadowMapSize2.xy, 
depth);
-    shadowColor = vec4(0.0, 0.0, 1.0, 1.0);       
-  }
-
-  const float shadowAmbient = 0.9;
-
-  // if you do your own ambient pass you'll want to remove the ambient code 
from here
-  const vec4 ambientColor = vec4 (0.05, 0.075, 0.1, 1.0);
-  vec4 diffuseColor =  texture2D(diffuseMap0, gl_TexCoord[0].st);
-
-  gl_FragColor = ((1.0 - shadowAmbient) * diffuseColor * shadowColor) +
-    (diffuseColor * shadowAmbient * diffuseAmount * shadowAmount * 
shadowColor);
-}

Deleted: 
code/gazebo/branches/wx/Media/materials/programs/pssm_vsm_diffuse_vp.glsl
===================================================================
--- code/gazebo/branches/wx/Media/materials/programs/pssm_vsm_diffuse_vp.glsl   
2010-09-15 02:29:40 UTC (rev 8905)
+++ code/gazebo/branches/wx/Media/materials/programs/pssm_vsm_diffuse_vp.glsl   
2010-09-15 15:42:21 UTC (rev 8906)
@@ -1,27 +0,0 @@
-uniform mat4 wMat;
-uniform mat4 wvpMat;
-uniform mat4 tvpMat;
-uniform vec4 spotlightDir;
-
-varying vec4 vertexWorldPosition;
-varying vec4 lightPosition0;
-varying vec3 vertexNormal;
-varying vec3 sdir;
-
-void main()
-{
-  vertexWorldPosition = mul(wMat, gl_Vertex);
-  gl_Position = mul(wvpMat, gl_Vertex);
-
-  gl_TexCoord[0] = gl_MultiTexCoord0;
-  gl_TexCoord[1] = gl_MultiTexCoord1;
-
-  vertexNormal = vec3(wMat * vec4(gl_Normal.xyz, 0.0));
-
-  sdir = vec3(wMat * spotlightDir);
-
-  lightPosition0 = tvpMat * vertexWorldPosition;
-
-  // pass the vertex position, transforming it to clip space
-  //gl_Position = ftransform();
-}

Deleted: 
code/gazebo/branches/wx/Media/materials/programs/pssm_vsm_diffuse_vp.glsl.bak
===================================================================
--- 
code/gazebo/branches/wx/Media/materials/programs/pssm_vsm_diffuse_vp.glsl.bak   
    2010-09-15 02:29:40 UTC (rev 8905)
+++ 
code/gazebo/branches/wx/Media/materials/programs/pssm_vsm_diffuse_vp.glsl.bak   
    2010-09-15 15:42:21 UTC (rev 8906)
@@ -1,38 +0,0 @@
-uniform vec4 lightPosition;           // world space
-uniform mat4 worldViewProjMatrix;
-uniform mat4 worldMatrix;
-uniform mat4 texViewProjMatrix0;
-uniform mat4 texViewProjMatrix1;
-uniform mat4 texViewProjMatrix2;
-
-uniform mat4 worldInverseTranspose;
-
-varying vec4 lightPosition0;
-varying vec4 lightPosition1;
-varying vec4 lightPosition2;
-varying vec3 vertexNormal;
-varying vec4  vertexWorldPosition;
-varying float shadowDistance;
-
-void main()
-{
-  // get normal in world space
-  vertexNormal = vec3(worldMatrix * vec4(normalize(gl_Normal.xyz), 0.0));
-
-  // pass the vertex position, transforming it to clip space
-  gl_Position = ftransform();
-
-  // pass texture co-ords through unchanged
-  gl_TexCoord[0] = gl_MultiTexCoord0;
-
-  // shadowDistance is in clip space
-  shadowDistance = gl_Position.z;
-
-  // get vertex position in world space
-  vertexWorldPosition = worldMatrix * gl_Vertex;
-
-  // Calculate the position of vertex in light space for shadowing
-  lightPosition0 = texViewProjMatrix0 * vertexWorldPosition;
-  lightPosition1 = texViewProjMatrix1 * vertexWorldPosition;
-  lightPosition2 = texViewProjMatrix2 * vertexWorldPosition;
-}

Copied: 
code/gazebo/branches/wx/Media/materials/programs/pssm_vsm_receiver_fp.glsl 
(from rev 8905, 
code/gazebo/branches/wx/Media/materials/programs/pssm_vsm_diffuse_fp.glsl)
===================================================================
--- code/gazebo/branches/wx/Media/materials/programs/pssm_vsm_receiver_fp.glsl  
                        (rev 0)
+++ code/gazebo/branches/wx/Media/materials/programs/pssm_vsm_receiver_fp.glsl  
2010-09-15 15:42:21 UTC (rev 8906)
@@ -0,0 +1,89 @@
+uniform vec3 lightDif0;
+uniform vec4 lightPos0;
+uniform vec4 lightAtt0;
+uniform vec4 invSMSize;
+uniform vec4 depthRange;
+uniform vec4 spotlightParams;
+uniform sampler2D dMap;
+uniform sampler2D shadowMap;
+
+varying vec4 vertexWorldPosition;
+varying vec4 lightPosition0;
+varying vec3 vertexNormal;
+varying vec3 sdir;
+
+vec2 btex2D_rg(sampler2D map, vec2 uv, float radius, vec2 offset) 
+{
+  // simple 3x3 filter
+  vec2 o = offset;
+  vec2 c = texture2D(map, uv.xy).rg; // center
+  c +=     texture2D(map, uv.xy - o.xy).rg; // top left
+  c +=     texture2D(map, uv.xy + o.xy).rg; // bottom right
+  c +=     texture2D(map, vec2(uv.x - o.x, uv.y)).rg; // left
+  c +=     texture2D(map, vec2(uv.x + o.x, uv.y)).rg; // right
+  c +=     texture2D(map, vec2(uv.x, uv.y + o.y)).rg; // bottom
+  c +=     texture2D(map, vec2(uv.x, uv.y - o.y)).rg; // top
+  c +=     texture2D(map, vec2(uv.x - o.x, uv.y + o.y)).rg; // bottom left
+  c +=     texture2D(map, vec2(uv.x + o.x, uv.y - o.y)).rg; // top right
+  return c / 9.0;
+}
+
+float shadow(in sampler2D shadowMap, in vec4 shadowMapPos, float ourDepth, 
float radius, vec2 offset) 
+{
+  vec2 suv = shadowMapPos.xy / shadowMapPos.w;
+
+  vec2 moments = btex2D_rg(shadowMap, suv, radius, offset);
+
+  float litFactor = (ourDepth <= moments.x ? 1.0 : 0.0);
+
+  // standard variance shadow mapping code
+  float E_x2 = moments.y;
+  float Ex_2 = moments.x * moments.x;
+  float vsmEpsilon = 0.0001;
+  float variance = min(max(E_x2 - Ex_2, 0.0) + vsmEpsilon, 1.0);
+  float m_d = moments.x - ourDepth;
+  float denom = (variance + m_d * m_d);
+  float p = variance / denom;
+
+  return smoothstep(0.4, 1.0, max(litFactor, p));
+}
+
+void main()
+{
+  // direction
+  vec3 ld0 = normalize(lightPos0.xyz - (lightPos0.w * 
vertexWorldPosition.xyz));
+
+  // attenuation
+  float ila = length(lightPos0.xyz - vertexWorldPosition.xyz) / lightAtt0.r;
+  ila *= ila; // quadratic falloff
+  float la = 1.0 - ila;
+
+  vec3 normal = normalize(vertexNormal);
+
+  float LdotN0 = max(dot(ld0, normal), 0.0);
+  vec4 difTex = texture2D(dMap, gl_TexCoord[0].xy);
+
+  // calculate the spotlight effect
+  float spot = dot(ld0, normalize(-sdir)); // angle between spotlight dir and 
actual dir
+  spot = clamp((spot - spotlightParams.y) / (spotlightParams.x - 
spotlightParams.y),0.0,1.0);
+
+  vec3 light0C =
+    //   N . L    LIGHT DIF   TEX DIF       ATT
+    //(LdotN0 * lightDif0 * difTex.xyz) * la * spot
+    (LdotN0 * lightDif0 * difTex.xyz) * la * spot *
+    shadow(
+        // pass in the shadow map
+        shadowMap,
+        // the calculated shadow position in the shadow map
+        lightPosition0,
+        // distance to light, done just as in the caster shader
+        (length(lightPos0.xyz - vertexWorldPosition.xyz) - depthRange.x) * 
depthRange.w,
+        // radius to blur (we discussed)
+        3.0,
+        // inverse shadow map size so we know how much to move when blurring
+        invSMSize.xy);
+
+  gl_FragColor = vec4(light0C, 1.0);
+  
+}
+

Copied: 
code/gazebo/branches/wx/Media/materials/programs/pssm_vsm_receiver_vp.glsl 
(from rev 8905, 
code/gazebo/branches/wx/Media/materials/programs/pssm_vsm_diffuse_vp.glsl)
===================================================================
--- code/gazebo/branches/wx/Media/materials/programs/pssm_vsm_receiver_vp.glsl  
                        (rev 0)
+++ code/gazebo/branches/wx/Media/materials/programs/pssm_vsm_receiver_vp.glsl  
2010-09-15 15:42:21 UTC (rev 8906)
@@ -0,0 +1,26 @@
+uniform mat4 wMat;
+uniform mat4 wvpMat;
+uniform mat4 tvpMat;
+uniform vec4 spotlightDir;
+
+varying vec4 vertexWorldPosition;
+varying vec4 lightPosition0;
+varying vec3 vertexNormal;
+varying vec3 sdir;
+
+void main()
+{
+  gl_Position = ftransform();
+
+  vertexWorldPosition = mul(wMat, gl_Vertex);
+  //gl_Position = mul(wvpMat, gl_Vertex);
+
+  gl_TexCoord[0] = gl_MultiTexCoord0;
+  gl_TexCoord[1] = gl_MultiTexCoord1;
+
+  vertexNormal = vec3(wMat * vec4(gl_Normal.xyz, 0.0));
+
+  sdir = vec3(wMat * spotlightDir);
+
+  lightPosition0 = tvpMat * vertexWorldPosition;
+}

Modified: code/gazebo/branches/wx/Media/materials/scripts/CMakeLists.txt
===================================================================
--- code/gazebo/branches/wx/Media/materials/scripts/CMakeLists.txt      
2010-09-15 02:29:40 UTC (rev 8905)
+++ code/gazebo/branches/wx/Media/materials/scripts/CMakeLists.txt      
2010-09-15 15:42:21 UTC (rev 8906)
@@ -1,4 +1,6 @@
-SET (files Gazebo.material diffuse.material shadow_caster.material
-blur.compositor blur.material)
+SET (files Gazebo.material 
+           shadow_receiver.material 
+           shadow_caster.material
+)
 
 INSTALL(FILES ${files} DESTINATION 
${CMAKE_INSTALL_PREFIX}/share/gazebo/Media/materials/scripts/)

Modified: code/gazebo/branches/wx/Media/materials/scripts/Gazebo.material
===================================================================
--- code/gazebo/branches/wx/Media/materials/scripts/Gazebo.material     
2010-09-15 02:29:40 UTC (rev 8905)
+++ code/gazebo/branches/wx/Media/materials/scripts/Gazebo.material     
2010-09-15 15:42:21 UTC (rev 8906)
@@ -22,7 +22,7 @@
 }
 
 // A really basic ambient pass program, support for one texture coodinate set
-vertex_program Ogre/BasicVertexPrograms/AmbientOneTexture glsl
+vertex_program AmbientOneTexture glsl
 {
   source AmbientOneTexture.glsl
 

Deleted: code/gazebo/branches/wx/Media/materials/scripts/diffuse.material
===================================================================
--- code/gazebo/branches/wx/Media/materials/scripts/diffuse.material    
2010-09-15 02:29:40 UTC (rev 8905)
+++ code/gazebo/branches/wx/Media/materials/scripts/diffuse.material    
2010-09-15 15:42:21 UTC (rev 8906)
@@ -1,94 +0,0 @@
-vertex_program diffuse_vs_glsl glsl
-{
-  source pssm_vsm_diffuse_vp.glsl
-  profiles vs_1_1 arbvp1
-
-  default_params
-  {
-    param_named_auto wMat world_matrix
-    param_named_auto wvpMat worldviewproj_matrix
-    param_named_auto tvpMat texture_viewproj_matrix 0
-    param_named_auto spotlightDir light_direction_object_space 0
-  }
-}
-
-fragment_program diffuse_ps_glsl glsl
-{
-    source pssm_vsm_diffuse_fp.glsl
-
-    default_params
-    {
-      param_named_auto lightDif0 light_diffuse_colour 0
-      param_named_auto lightPos0 light_position 0
-      param_named_auto lightAtt0 light_attenuation 0
-      param_named_auto invSMSize inverse_texture_size 1
-      param_named_auto depthRange shadow_scene_depth_range 0
-      param_named_auto spotlightParams spotlight_params 0
-      param_named dMap int 0
-      param_named shadowMap int 1
-    }
-}
-
-abstract material diffuse_template
-{
-  technique
-  {
-    pass
-    {
-      ambient  1 1 1
-      diffuse  0 0 0
-      specular 0 0 0 0
-      emissive 0 0 0
-
-      ///vertex_program_ref ambient_vs
-      //{
-      //}
-
-      //fragment_program_ref ambient_ps
-      //{
-      //}
-
-      texture_unit ambient_tex
-      {
-      }
-    }
-
-    pass
-    {
-      max_lights 8
-      scene_blend add
-      iteration once_per_light
-
-      ambient  0 0 0
-      diffuse  1 1 1
-      specular 1 1 1 128
-
-      vertex_program_ref diffuse_vs_glsl
-      {
-      }
-
-      fragment_program_ref diffuse_ps_glsl
-      {
-      }
-
-      texture_unit diffuse_tex
-      {
-      }
-
-      texture_unit shadow_tex
-      {
-        content_type shadow
-        filtering anisotropic
-        max_anisotropy 16
-        tex_address_mode border
-        tex_border_colour 1 1 1
-      }
-    }
-  }
-}
-
-material Gazebo/GrayGrid : diffuse_template
-{
-  set_texture_alias ambient_tex grayGrid.png
-  set_texture_alias diffuse_tex grayGrid.png
-}

Deleted: code/gazebo/branches/wx/Media/materials/scripts/pssm.material
===================================================================
--- code/gazebo/branches/wx/Media/materials/scripts/pssm.material       
2010-09-15 02:29:40 UTC (rev 8905)
+++ code/gazebo/branches/wx/Media/materials/scripts/pssm.material       
2010-09-15 15:42:21 UTC (rev 8906)
@@ -1,132 +0,0 @@
-vertex_program pssm_vsm_caster_vp glsl
-{
-  source pssm_vsm_caster_vp.glsl
-
-  default_params
-  {
-    param_named_auto pMat projection_matrix
-    param_named_auto wvMat worldview_matrix
-  }
-}
-
-fragment_program pssm_vsm_caster_fp glsl
-{
-  source pssm_vsm_caster_fp.glsl
-
-  default_params
-  {
-    param_named_auto depthRange scene_depth_range
-  }
-}
-
-vertex_program pssm_vsm_diffuse_vp glsl
-{
-  source pssm_vsm_diffuse_vp.glsl
-  default_params
-  {
-    param_named_auto wMat world_matrix
-    param_named_auto wvpMat worldviewproj_matrix
-    param_named_auto tvpMat texture_viewproj_matrix 0
-    param_named_auto spotlightDir light_direction_object_space 0
-  }
-}
-
-fragment_program pssm_vsm_diffuse_fp glsl
-{
-  source pssm_vsm_diffuse_fp.glsl
-   
-  default_params
-  {
-    param_named_auto lightDif0 light_diffuse_colour 0
-    param_named_auto lightPos0 light_position 0
-    param_named_auto lightAtt0 light_attenuation 0
-    param_named_auto invSMSize inverse_texture_size 1
-    param_named_auto depthRange shadow_scene_depth_range 0
-    param_named_auto spotlightParams spotlight_params 0
-    param_named dMap int 0
-    param_named shadowMap int 1
-  }
-}
-
-
-material pssm_vsm_caster
-{
-  technique
-  {
-    // all this will do is write depth and depth squared to red and green
-    pass
-    {
-      vertex_program_ref pssm_vsm_caster_vp
-      {
-      }
-
-      fragment_program_ref pssm_vsm_caster_fp
-      {
-      }
-    }
-  }
-}
-
-abstract material diffuse_template
-{
-  technique
-  {
-    pass
-    {
-      ambient  1 1 1
-      diffuse  0 0 0
-      specular 0 0 0 0
-      emissive 0 0 0
-
-      ///vertex_program_ref ambient_vs
-      //{
-      //}
-
-      //fragment_program_ref ambient_ps
-      //{
-      //}
-
-      texture_unit ambient_tex
-      {
-      }
-    }
-
-    pass
-    {
-      max_lights 8
-      scene_blend add
-      iteration once_per_light
-
-      ambient  0 0 0
-      diffuse  1 1 1
-      specular 1 1 1 128
-
-      vertex_program_ref pssm_vsm_diffuse_vp
-      {
-      }
-
-      fragment_program_ref pssm_vsm_diffuse_fp
-      {
-      }
-
-      texture_unit diffuse_tex
-      {
-      }
-
-      texture_unit shadow_tex
-      {
-        content_type shadow
-        filtering anisotropic
-        max_anisotropy 16
-        tex_address_mode border
-        tex_border_colour 1 1 1
-      }
-    }
-  }
-}
-
-material Gazebo/GrayGrid : diffuse_template
-{
-  set_texture_alias ambient_tex grayGrid.png
-  set_texture_alias diffuse_tex grayGrid.png
-}

Deleted: code/gazebo/branches/wx/Media/materials/scripts/pssm.material.old
===================================================================
--- code/gazebo/branches/wx/Media/materials/scripts/pssm.material.old   
2010-09-15 02:29:40 UTC (rev 8905)
+++ code/gazebo/branches/wx/Media/materials/scripts/pssm.material.old   
2010-09-15 15:42:21 UTC (rev 8906)
@@ -1,139 +0,0 @@
-// declare the vertex shader (CG for the language)
-vertex_program PSSM/shadow_caster_vs cg
-{
-       // source file
-       source pssm.cg
-       // will run on vertex shader 1.1+
-       profiles vs_1_1 arbvp1
-       // entry function
-       entry_point shadow_caster_vs
-
-       default_params
-       {
-               param_named_auto wvpMat worldviewproj_matrix
-               // this is the scene's depth range
-               //param_named_auto depthRange                   
scene_depth_range
-               //param_named_auto optimalAdustFactor   custom 0
-       }
-}
-
-// declare the fragment shader (CG for the language)
-fragment_program PSSM/shadow_caster_ps cg
-{
-       // source file
-       source pssm.cg
-       // will run on pixel shader 2.0+
-       profiles ps_2_0 arbfp1
-       // entry function
-       entry_point shadow_caster_ps
-
-       default_params
-       {
-       }
-}
-
-material PSSM/shadow_caster
-{
-       technique
-       {
-               // all this will do is write depth and depth\xB2 to red and 
green
-               pass
-               {
-                       vertex_program_ref PSSM/shadow_caster_vs
-                       {
-                       }
-
-                       fragment_program_ref PSSM/shadow_caster_ps
-                       {
-                       }
-               }
-       }
-}
-
-
-
-vertex_program PSSM/shadow_receiver_vs cg
-{
-       source pssm.cg
-       profiles vs_1_1 arbvp1
-       entry_point shadow_receiver_vs
-
-       default_params
-       {
-               param_named_auto lightPosition                          
light_position_object_space 0
-               param_named_auto eyePosition                            
camera_position_object_space
-               param_named_auto worldViewProjMatrix            
worldviewproj_matrix
-               param_named_auto texWorldViewProjMatrix0        
texture_worldviewproj_matrix 0
-               param_named_auto texWorldViewProjMatrix1        
texture_worldviewproj_matrix 1
-               param_named_auto texWorldViewProjMatrix2        
texture_worldviewproj_matrix 2
-               //param_named_auto depthRange0                          
shadow_scene_depth_range 0
-               //param_named_auto depthRange1                          
shadow_scene_depth_range 1
-               //param_named_auto depthRange2                          
shadow_scene_depth_range 2
-       }
-}
-
-fragment_program PSSM/shadow_receiver_ps cg
-{
-       source pssm.cg
-       profiles ps_2_x arbfp1
-       entry_point shadow_receiver_ps
-
-       default_params
-       {
-               param_named_auto lightDiffuse           
derived_light_diffuse_colour 0
-               param_named_auto lightSpecular          
derived_light_specular_colour 0
-               param_named_auto ambient                        
derived_ambient_light_colour 
-               param_named_auto invShadowMapSize0      inverse_texture_size 0
-               param_named_auto invShadowMapSize1      inverse_texture_size 1
-               param_named_auto invShadowMapSize2      inverse_texture_size 2
-               //param_named pssmSplitPoints MANUAL
-       }
-}
-
-
-abstract material PSSM/base_receiver
-{
-       technique
-       {
-               pass
-               {
-                       ambient 1 1 1 1
-                       diffuse 1 1 1 1
-
-                       vertex_program_ref PSSM/shadow_receiver_vs {}
-                       fragment_program_ref PSSM/shadow_receiver_ps {}
-
-                       texture_unit shadow_tex0
-                       {
-                               content_type shadow
-                               tex_address_mode clamp
-                       }
-                       texture_unit shadow_tex1
-                       {
-                               content_type shadow
-                               tex_address_mode clamp
-                       }
-                       texture_unit shadow_tex2
-                       {
-                               content_type shadow
-                               tex_address_mode clamp
-                       }
-
-                       texture_unit diffuse_tex
-                       {
-                               texture $diffuse
-                       }
-               }
-       }
-}
-
-material PSSM/Plane : PSSM/base_receiver
-{
-       set $diffuse BumpyMetal.jpg
-}
-
-material PSSM/Knot : PSSM/base_receiver
-{
-       set $diffuse MtlPlat2.jpg
-}
-

Deleted: code/gazebo/branches/wx/Media/materials/scripts/pssm_ogre.material
===================================================================
--- code/gazebo/branches/wx/Media/materials/scripts/pssm_ogre.material  
2010-09-15 02:29:40 UTC (rev 8905)
+++ code/gazebo/branches/wx/Media/materials/scripts/pssm_ogre.material  
2010-09-15 15:42:21 UTC (rev 8906)
@@ -1,139 +0,0 @@
-// declare the vertex shader (CG for the language)
-vertex_program PSSM/shadow_caster_vs cg
-{
-       // source file
-       source pssm.cg
-       // will run on vertex shader 1.1+
-       profiles vs_1_1 arbvp1
-       // entry function
-       entry_point shadow_caster_vs
-
-       default_params
-       {
-               param_named_auto wvpMat worldviewproj_matrix
-               // this is the scene's depth range
-               //param_named_auto depthRange                   
scene_depth_range
-               //param_named_auto optimalAdustFactor   custom 0
-       }
-}
-
-// declare the fragment shader (CG for the language)
-fragment_program PSSM/shadow_caster_ps cg
-{
-       // source file
-       source pssm.cg
-       // will run on pixel shader 2.0+
-       profiles ps_2_0 arbfp1
-       // entry function
-       entry_point shadow_caster_ps
-
-       default_params
-       {
-       }
-}
-
-material PSSM/shadow_caster
-{
-       technique
-       {
-               // all this will do is write depth and depth\xB2 to red and 
green
-               pass
-               {
-                       vertex_program_ref PSSM/shadow_caster_vs
-                       {
-                       }
-
-                       fragment_program_ref PSSM/shadow_caster_ps
-                       {
-                       }
-               }
-       }
-}
-
-
-
-vertex_program PSSM/shadow_receiver_vs cg
-{
-       source pssm.cg
-       profiles vs_1_1 arbvp1
-       entry_point shadow_receiver_vs
-
-       default_params
-       {
-               param_named_auto lightPosition                          
light_position_object_space 0
-               param_named_auto eyePosition                            
camera_position_object_space
-               param_named_auto worldViewProjMatrix            
worldviewproj_matrix
-               param_named_auto texWorldViewProjMatrix0        
texture_worldviewproj_matrix 0
-               param_named_auto texWorldViewProjMatrix1        
texture_worldviewproj_matrix 1
-               param_named_auto texWorldViewProjMatrix2        
texture_worldviewproj_matrix 2
-               //param_named_auto depthRange0                          
shadow_scene_depth_range 0
-               //param_named_auto depthRange1                          
shadow_scene_depth_range 1
-               //param_named_auto depthRange2                          
shadow_scene_depth_range 2
-       }
-}
-
-fragment_program PSSM/shadow_receiver_ps cg
-{
-       source pssm.cg
-       profiles ps_2_x arbfp1
-       entry_point shadow_receiver_ps
-
-       default_params
-       {
-               param_named_auto lightDiffuse           
derived_light_diffuse_colour 0
-               param_named_auto lightSpecular          
derived_light_specular_colour 0
-               param_named_auto ambient                        
derived_ambient_light_colour 
-               param_named_auto invShadowMapSize0      inverse_texture_size 0
-               param_named_auto invShadowMapSize1      inverse_texture_size 1
-               param_named_auto invShadowMapSize2      inverse_texture_size 2
-               //param_named pssmSplitPoints MANUAL
-       }
-}
-
-
-abstract material PSSM/base_receiver
-{
-       technique
-       {
-               pass
-               {
-                       ambient 1 1 1 1
-                       diffuse 1 1 1 1
-
-                       vertex_program_ref PSSM/shadow_receiver_vs {}
-                       fragment_program_ref PSSM/shadow_receiver_ps {}
-
-                       texture_unit shadow_tex0
-                       {
-                               content_type shadow
-                               tex_address_mode clamp
-                       }
-                       texture_unit shadow_tex1
-                       {
-                               content_type shadow
-                               tex_address_mode clamp
-                       }
-                       texture_unit shadow_tex2
-                       {
-                               content_type shadow
-                               tex_address_mode clamp
-                       }
-
-                       texture_unit diffuse_tex
-                       {
-                               texture $diffuse
-                       }
-               }
-       }
-}
-
-material PSSM/Plane : PSSM/base_receiver
-{
-       set $diffuse BumpyMetal.jpg
-}
-
-material PSSM/Knot : PSSM/base_receiver
-{
-       set $diffuse MtlPlat2.jpg
-}
-

Copied: 
code/gazebo/branches/wx/Media/materials/scripts/shadow_receiver.material (from 
rev 8905, code/gazebo/branches/wx/Media/materials/scripts/diffuse.material)
===================================================================
--- code/gazebo/branches/wx/Media/materials/scripts/shadow_receiver.material    
                        (rev 0)
+++ code/gazebo/branches/wx/Media/materials/scripts/shadow_receiver.material    
2010-09-15 15:42:21 UTC (rev 8906)
@@ -0,0 +1,93 @@
+vertex_program receiver_vs_glsl glsl
+{
+  source pssm_vsm_receiver_vp.glsl
+
+  default_params
+  {
+    param_named_auto wMat world_matrix
+    param_named_auto wvpMat worldviewproj_matrix
+    param_named_auto tvpMat texture_viewproj_matrix 0
+    param_named_auto spotlightDir light_direction_object_space 0
+  }
+}
+
+fragment_program receiver_ps_glsl glsl
+{
+  source pssm_vsm_receiver_fp.glsl
+
+  default_params
+  {
+    param_named_auto lightDif0 light_receiver_colour 0
+    param_named_auto lightPos0 light_position 0
+    param_named_auto lightAtt0 light_attenuation 0
+    param_named_auto invSMSize inverse_texture_size 1
+    param_named_auto depthRange shadow_scene_depth_range 0
+    param_named_auto spotlightParams spotlight_params 0
+    param_named dMap int 0
+    param_named shadowMap int 1
+  }
+}
+
+abstract material receiver_template
+{
+  technique
+  {
+    pass
+    {
+      ambient  1 1 1
+      diffuse  0 0 0
+      specular 0 0 0 0
+      emissive 0 0 0
+
+      ///vertex_program_ref ambient_vs
+      //{
+      //}
+
+      //fragment_program_ref ambient_ps
+      //{
+      //}
+
+      texture_unit ambient_tex
+      {
+      }
+    }
+
+    pass
+    {
+      max_lights 8
+      scene_blend add
+      iteration once_per_light
+
+      ambient  0 0 0
+      diffuse  1 1 1
+      specular 1 1 1 128
+
+      vertex_program_ref receiver_vs_glsl
+      {
+      }
+
+      fragment_program_ref receiver_ps_glsl
+      {
+      }
+
+      texture_unit diffuse_tex
+      {
+      }
+
+      texture_unit shadow_tex
+      {
+        content_type shadow
+        filtering anisotropic
+        max_anisotropy 16
+        tex_address_mode border
+        tex_border_colour 1 1 1
+      }
+    }
+  }
+}
+
+material Gazebo/GrayGrid : receiver_template
+{
+  set_texture_alias ambient_tex grayGrid.png
+  set_texture_alias diffuse_tex grayGrid.png
+}


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to