Frederic De Groef avatar Frederic De Groef committed 42f16ba

added some uniforms for future use

Comments (0)

Files changed (3)

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;	
         }
     }
 

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
+	  }
+
     }
   }
 }

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
     }
 }
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.