Commits

Frederic De Groef  committed 42f16ba

added some uniforms for future use

  • Participants
  • Parent commits 39560a0

Comments (0)

Files changed (3)

File media/ssao/crytek/crytek_ssao.cg

     ,uniform float far
     ,uniform sampler2D geomMap : TEXUNIT0
 	,uniform sampler2D randMap : TEXUNIT1
-    ,uniform float farDistance
+	,uniform float4 viewportSize
+    ,uniform float nearDistance
+	,uniform float farDistance
+	,uniform float sampleInScreenSpace
+	,uniform float sampleLengthScreenSpace
     ,out float4 oColor)
 {
 
          
         float len = length(P-Q);
         
-        if(sampled_depth < z && len < 10)
+        if(sampled_depth < z)
         {
             count += 1;
-			//ao += 1.0 / (1.0 + (len*len));
-			ao += len;	
+			ao += 1.0 / (1.0 + (len*len));
+			//ao += len;	
         }
     }
 

File media/ssao/crytek/crytek_ssao.material

   {
     pass
     {
+		depth_check off
+
       vertex_program_ref crytek_ssao_vs
       {
       }
 
       fragment_program_ref crytek_ssao_ps
       {
+		param_named_auto viewportSize viewport_size
+		param_named_auto farDistance far_clip_distance
+		param_named_auto nearDistance near_clip_distance
+		param_named_auto cFov fov
       }
 
       texture_unit geomMap
         filtering none
       }
 
-      texture_unit randMap
-      {
-        texture random.png
-        filtering none
-        tex_coord_set 0
-        tex_address_mode wrap
-      }
+	  texture_unit 
+	  {
+ 	     texture regularSphereJittered4.png
+		 tex_address_mode wrap
+		 filtering none
+	  }
+
     }
   }
 }

File media/ssao/crytek/crytek_ssao.program

     profiles     ps_2_x
     default_params
     {
-		param_name_auto farDistance far_clip_distance
+		//param_name_auto farDistance far_clip_distance
     }
 }