Changeset 3130 for GTP/trunk/App/Demos
- Timestamp:
- 11/17/08 08:47:04 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/combineSsao.cg
r3129 r3130 87 87 88 88 //depthFactor = clamp(1.0f - abs(1.0f - eyeSpaceDepth / aoSample.w), 1e-3f, 1.0f); 89 depthFactor = max(step(5e- 2f, 1.0f - abs(1.0f - eyeSpaceDepth / aoSample.w)), 1e-3f);90 normalFactor = max(step(0. 5f, dot(sampleNorm, norm)), 1e-3f);89 depthFactor = max(step(5e-1f, 1.0f - abs(1.0f - eyeSpaceDepth / aoSample.w)), 1e-3f); 90 normalFactor = max(step(0.6f, dot(sampleNorm, norm)), 1e-3f); 91 91 92 92 w = filterWeights[i] * normalFactor * depthFactor; … … 119 119 if (col.w < 1e10f) 120 120 { 121 //const static float scaleFactor = 50.0f;122 const static float scaleFactor = 10.0f;123 const static float adaptFactor = 10.0f;121 const static float scaleFactor = 1.0f; 122 //const static float scaleFactor = 10.0f; 123 const static float adaptFactor = 50.0f; 124 124 125 125 //ao.x = Filter(IN.texCoord, ssaoTex, filterOffs, filterWeights); 126 126 //ao.x = Filter(IN.texCoord, ssaoTex, filterOffs, filterWeights, 1.0f / (1.0f + ao.y)); 127 //ao.x = DiscontinuityFilter(IN.texCoord, ao, ssaoTex, normalsTex, filterOffs, filterWeights, scaleFactor / (scaleFactor + ao.y));128 ao.x = DiscontinuityFilter(IN.texCoord, ao, ssaoTex, normalsTex, filterOffs, filterWeights, adaptFactor * scaleFactor * ao.z/ (adaptFactor + ao.y), 0);129 } 130 131 OUT.illum_col.xyz = col.xyz * ao.x;127 //ao.x = DiscontinuityFilter(IN.texCoord, ao, ssaoTex, normalsTex, filterOffs, filterWeights, adaptFactor * scaleFactor * ao.z / (adaptFactor + ao.y), 0); 128 ao.x = DiscontinuityFilter(IN.texCoord, ao, ssaoTex, normalsTex, filterOffs, filterWeights, adaptFactor * scaleFactor / (adaptFactor + ao.y), 0); 129 } 130 131 //OUT.illum_col.xyz = col.xyz * ao.x; 132 132 //OUT.illum_col = float4(ao.x, ao.x, ao.x, col.w); 133 //OUT.illum_col.xyz = float3(1.0f - ao.x, 1.0f - ao.y * 1e-2f, 1);133 OUT.illum_col.xyz = float3(1.0f - ao.x, clamp(1.0f - ao.y * 1e-2f, 0, 1), 1); 134 134 OUT.illum_col.w = col.w; 135 135 … … 168 168 //depthFactor = clamp(1.0f - abs(1.0f - eyeSpaceDepth / aoSample.w), 1e-3f, 1.0f); 169 169 depthFactor = max(step(5e-1f, 1.0f - abs(1.0f - eyeSpaceDepth / aoSample.w)), 1e-3f); 170 normalFactor = max(step(0. 3f, dot(sampleNorm, norm)), 1e-3f);170 normalFactor = max(step(0.6f, dot(sampleNorm, norm)), 1e-3f); 171 171 172 172 //w = filterWeights[i] * normalFactor * depthFactor; … … 196 196 const static float scaleFactor = 10.0f; 197 197 ao.y = DiscontinuityFilter2(IN.texCoord, ao, ssaoTex, normalsTex, filterOffs, filterWeights, scaleFactor * ao.z, 1); 198 //ao.y = DiscontinuityFilter2(IN.texCoord, ao, ssaoTex, normalsTex, filterOffs, filterWeights, scaleFactor, 1); 198 199 199 200 OUT.illum_col = ao;
Note: See TracChangeset
for help on using the changeset viewer.