- Timestamp:
- 04/10/09 15:46:35 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/combineSsaoSep.cg
r3328 r3339 109 109 const float3 centerPos = ReconstructSamplePos(colorsTex, texCoord, bl, br, tl, tr); 110 110 111 const float scale = 1.0f;//saturate((SSAO_CONVERGENCE_THRESHOLD - convergence) / SSAO_CONVERGENCE_THRESHOLD);111 const float scale = saturate((SSAO_CONVERGENCE_THRESHOLD - convergence) / SSAO_CONVERGENCE_THRESHOLD); 112 112 //const int radius = SSAO_FILTER_RADIUS * saturate((SSAO_CONVERGENCE_THRESHOLD - convergence) / SSAO_CONVERGENCE_THRESHOLD); 113 113 … … 115 115 for (int i = -SSAO_FILTER_RADIUS; i <= SSAO_FILTER_RADIUS; ++ i) 116 116 { 117 float4 sampleTexCoord = float4(texCoord + i * xyStep * scale, .0f, .0f);117 const float4 sampleTexCoord = float4(texCoord + i * xyStep * scale, .0f, .0f); 118 118 result += FilterSample(sampleTexCoord, ssaoTex, colorsTex, centerPos, bl, br, tl, tr, maxConvergence, spatialWeight); 119 119 } 120 120 121 121 result.x /= max(result.y, 1e-6f); 122 123 122 return saturate(result.x); 124 123 }
Note: See TracChangeset
for help on using the changeset viewer.