- Timestamp:
- 11/25/08 12:02:58 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/combineSsao.cg
r3161 r3162 63 63 //sampleDepth = aoSample.w; 64 64 65 //depthFactor = max(step(1e-1f, 1.0f - abs(1.0f - eyeSpaceDepth / sampleDepth)), 1e-3f); 66 depthFactor = 1.0f / max(abs(eyeSpaceDepth - sampleDepth), 1e-3f); 67 //normalFactor = max(step(0.6f, dot(sampleNorm, centerNormal)), 1e-6f); 68 normalFactor = max(dot(sampleNorm, centerNormal), 1e-6f); 69 convergenceFactor = min(200.0f, aoSample.y) * 0.01f; 65 //depthFactor = 1.0f / max(abs(eyeSpaceDepth - sampleDepth), 1e-2f); 66 depthFactor = 1.0f - step(1e-2f, abs(1.0f - eyeSpaceDepth / sampleDepth)); 67 //normalFactor = max(step(0.6f, dot(sampleNorm, centerNormal)), 1e-3f); 68 normalFactor = max(dot(sampleNorm, centerNormal), 1e-3f); 69 //convergenceFactor = min(100.0f, aoSample.y); 70 convergenceFactor = aoSample.y; 70 71 71 72 // combine the weights 72 w = depthFactor * normalFactor * convergenceFactor; 73 w = filterWeights[i] * convergenceFactor * depthFactor * normalFactor; 74 //w = normalFactor * convergenceFactor; 73 75 74 76 average += aoSample.x * w; … … 76 78 } 77 79 78 average /= max(total_w, 1e- 1f);80 average /= max(total_w, 1e-6f); 79 81 80 82 return saturate(average); … … 123 125 } 124 126 125 OUT.illum_col.xyz = col.xyz * ao.x;126 //OUT.illum_col.xyz = float3(0, ao.x, 0);127 //OUT.illum_col.xyz = col.xyz * ao.x; 128 OUT.illum_col.xyz = float3(ao.x, ao.x, ao.x); 127 129 //OUT.illum_col.xyz = float3(0, clamp(1.0f - ao.y * 1e-2f, 0, 1), 1); 128 130 OUT.illum_col.w = col.w;
Note: See TracChangeset
for help on using the changeset viewer.