Ignore:
Timestamp:
08/26/08 16:27:11 (16 years ago)
Author:
mattausch
Message:

changed ssao to multipass algorithm

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/antialiasing.cg

    r2867 r2868  
    1111 
    1212// the barrier for detecting a discontinuity 
    13 uniform float4 e_barrier = float4(5e-3, 5e-3, 0, 0); // x = normal, y = depth 
     13uniform float4 e_barrier = float4(5e-4, 5e-4, 0, 0); // x = normal, y = depth 
    1414// the weights for normal / depth discontinuity 
    1515uniform float4 e_weights = float4(1.0f, 1.0f, 1.0f, 1.0f); // x = normal, y = depth 
     
    3232        nd.w = dot(nc, float3(tex2D(normals, IN.lb.xy))); 
    3333 
    34         nd -= e_barrier.x; 
    35         nd = step(0.0f, nd); 
     34        nd.x -= e_barrier.x; 
     35        nd = step((float4)0.0f, nd); 
    3636 
    3737        float ne = saturate(dot(nd, e_weights.x)); 
     
    8383 
    8484        return (s0 + s1 + s2 + s3) / 4.0f; 
     85        //return float4(w); 
    8586} 
Note: See TracChangeset for help on using the changeset viewer.