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

made changes to view transformation but still not working

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

Legend:

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

    r2884 r2887  
    8484        float4 s3 = tex2Dlod(colors, float4(offset + IN.lb.xy * w, 0, 0)); 
    8585 
    86         float4 sx = tex2D(colors, IN.c.xy); 
    87  
    88         //return (sx + sx) * 0.5f; 
     86        //float4 sx = tex2D(colors, IN.c.xy); 
    8987 
    9088        return (s0 + s1 + s2 + s3) * 0.25f; 
    91         //return (s0 + s1 + s2 + s3) * 0.25f; 
    92  
    9389        //return float4(w); 
    9490} 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg

    r2884 r2887  
    2424{ 
    2525        float4 lightDir = float4(0.8f, -1.0f, 0.7f, 0.0f); 
     26        //float4 lightDir = float4(0.0f, 1.0f, 0.0f, 0.0f); 
    2627        float4 lightDir2 = float4(-0.5f, 0.5f, 0.4f, 0.0f); 
    2728 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/globillum.cg

    r2884 r2887  
    9696 
    9797                // if normal perpenticular to view dir, only half of the samples count 
    98                 const float view_correction = 1.0f + VIEW_CORRECTION_SCALE * (1.0f - dot(currentViewDir, currentNormal)); 
    99  
    100                 total_color.w -= cos_angle * distance_intensity * view_correction; 
    101  
    102                 total_color.xyz += cos_angle * distance_intensity * view_correction * sample_color * ILLUM_INTENSITY; 
     98                //const float view_correction = 1.0f + VIEW_CORRECTION_SCALE * (1.0f - dot(currentViewDir, currentNormal)); 
     99                //total_color.w -= cos_angle * distance_intensity * view_correction; 
     100                //total_color.xyz += cos_angle * distance_intensity * view_correction * sample_color * ILLUM_INTENSITY; 
     101 
     102                total_color.w -= cos_angle * distance_intensity; 
     103                total_color.xyz += cos_angle * distance_intensity * sample_color * ILLUM_INTENSITY; 
    103104        } 
    104105 
  • 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.