Ignore:
Timestamp:
08/31/08 13:15:30 (16 years ago)
Author:
mattausch
Message:

made changes to view transformation but still not working

File:
1 edited

Legend:

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

    r2886 r2887  
    8888                // if surface normal perpenticular to view dir, approx. half of the samples will not count 
    8989                // => compensate for this (on the other hand, projected sampling area could be larger!) 
    90                 const float view_correction = 1.0f + VIEW_CORRECTION_SCALE * (1.0f - dot(currentViewDir, currentNormal)); 
     90                //const float view_correction = 1.0f + VIEW_CORRECTION_SCALE * (1.0f - dot(currentViewDir, currentNormal)); 
     91                //total_ao += cos_angle * distance_intensity * view_correction; 
    9192 
    92                 total_ao += cos_angle * distance_intensity * view_correction; 
     93                total_ao += cos_angle * distance_intensity; 
    9394        } 
    9495 
    95         return max(0.0f, 1.0f - total_ao); 
     96        //return max(0.0f, 1.0f - total_ao); 
     97        return saturate(dot(currentViewDir, currentNormal)); 
    9698} 
    9799 
     
    178180        float4 ao = tex2D(ssaoTex, IN.texCoord.xy); 
    179181 
    180         OUT.illum_col = col * ao.x; 
    181         //OUT.illum_col = ao; 
     182        //OUT.illum_col = col * ao.x; 
     183        OUT.illum_col = ao; 
     184 
    182185        OUT.illum_col.w = ao.w; 
    183186 
Note: See TracChangeset for help on using the changeset viewer.