Ignore:
Timestamp:
08/25/08 20:20:42 (16 years ago)
Author:
mattausch
Message:

bug: downsampling of positions does not work

Location:
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders
Files:
3 edited

Legend:

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

    r2865 r2866  
    3131 
    3232        nd -= e_barrier.x; 
    33         nd = step(0, nd); 
     33        nd = step(0.0f, nd); 
    3434 
    3535        float ne = saturate(dot(nd, e_weights.x)); 
     
    6464 
    6565        dd = abs(2.0f * dc - dd) - e_barrier.y; 
    66         dd = step(dd, 0); 
     66        dd = step(dd, 0.0f); 
     67 
    6768        float de = saturate(dot(dd, e_weights.y)); 
    6869 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg

    r2865 r2866  
    104104                        (SAMPLE_INTENSITY * DISTANCE_SCALE) / (DISTANCE_SCALE + length_to_sample * length_to_sample); 
    105105 
    106                 // if surface normal perpenticular to view dir, the samples count less => compensate for this 
     106                // if surface normal perpenticular to view dir, some samples probably count less  
     107                // => compensate for this 
    107108                float view_correction = 1.0f + VIEW_CORRECTION_SCALE * (1.0f - dot(currentViewDir, currentNormal)); 
    108109 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/mrt.cg

    r2865 r2866  
    7575        pixel pix; 
    7676 
     77        // save color in first render target 
    7778        pix.col = (ambient + diffuse) * tex2D(tex, IN.texCoord.xy); 
     79        // save world position in second rt 
    7880        pix.pos = IN.worldPos * maxDepth; 
     81        // save normal in third rt 
    7982        pix.norm.xyz = IN.normal * 0.5f + 0.5f; 
    8083 
    8184        // hack: squeeze some information about ambient into the texture 
    8285        pix.norm.w = ambient.x; 
    83         // hack: store projection coordinate for scaling ssao 
     86        // store projection coordinates with positions (used for ssao) 
    8487        pix.pos.w = IN.projPos.w; 
    8588 
Note: See TracChangeset for help on using the changeset viewer.