Changeset 2887 for GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders
- Timestamp:
- 08/31/08 13:15:30 (16 years ago)
- 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 84 84 float4 s3 = tex2Dlod(colors, float4(offset + IN.lb.xy * w, 0, 0)); 85 85 86 float4 sx = tex2D(colors, IN.c.xy); 87 88 //return (sx + sx) * 0.5f; 86 //float4 sx = tex2D(colors, IN.c.xy); 89 87 90 88 return (s0 + s1 + s2 + s3) * 0.25f; 91 //return (s0 + s1 + s2 + s3) * 0.25f;92 93 89 //return float4(w); 94 90 } -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg
r2884 r2887 24 24 { 25 25 float4 lightDir = float4(0.8f, -1.0f, 0.7f, 0.0f); 26 //float4 lightDir = float4(0.0f, 1.0f, 0.0f, 0.0f); 26 27 float4 lightDir2 = float4(-0.5f, 0.5f, 0.4f, 0.0f); 27 28 -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/globillum.cg
r2884 r2887 96 96 97 97 // 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; 103 104 } 104 105 -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao.cg
r2886 r2887 88 88 // if surface normal perpenticular to view dir, approx. half of the samples will not count 89 89 // => 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; 91 92 92 total_ao += cos_angle * distance_intensity * view_correction;93 total_ao += cos_angle * distance_intensity; 93 94 } 94 95 95 return max(0.0f, 1.0f - total_ao); 96 //return max(0.0f, 1.0f - total_ao); 97 return saturate(dot(currentViewDir, currentNormal)); 96 98 } 97 99 … … 178 180 float4 ao = tex2D(ssaoTex, IN.texCoord.xy); 179 181 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 182 185 OUT.illum_col.w = ao.w; 183 186
Note: See TracChangeset
for help on using the changeset viewer.