Changeset 3162 for GTP/trunk/App/Demos/Vis
- Timestamp:
- 11/25/08 12:02:58 (16 years ago)
- Location:
- GTP/trunk/App/Demos/Vis/FriendlyCulling/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp
r3161 r3162 521 521 522 522 // antialiasing of the color buffer 523 //AntiAliasing(fbo, light);523 AntiAliasing(fbo, light); 524 524 525 525 switch (mShadingMethod) … … 670 670 GLuint normalsTex = fbo->GetColorBuffer(1)->GetTexture(); 671 671 672 FrameBufferObject::Release();673 672 // read the second buffer, write to the first buffer 674 673 //FlipFbos(fbo); 674 // end of the pipeline => just draw image to screen 675 FrameBufferObject::Release(); 675 676 676 677 // the neighbouring texels -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SampleGenerator.cpp
r3103 r3162 71 71 72 72 if ((rx * rx + ry * ry > mRadius * mRadius) 73 // also test if sample exactly in center => avoid that73 // also avoid case that sample exactly in center 74 74 || (distanceSquared <= 1e-3f) 75 75 ) -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaderenv.h
r3161 r3162 7 7 8 8 //#define NUM_SAMPLES 8 9 #define NUM_SAMPLES 489 #define NUM_SAMPLES 24 10 10 11 11 // for quadratic falloff 12 12 //#define SAMPLE_INTENSITY 0.2f 13 #define SAMPLE_INTENSITY 0.07f14 //#define SAMPLE_INTENSITY 0.005f13 //#define SAMPLE_INTENSITY 0.07f 14 #define SAMPLE_INTENSITY 0.01f 15 15 16 16 //#define SAMPLE_INTENSITY 0.075f … … 61 61 62 62 //#define NUM_SSAO_FILTERSAMPLES 25 63 #define NUM_SSAO_FILTERSAMPLES 863 #define NUM_SSAO_FILTERSAMPLES 25 64 64 //#define NUM_SSAO_FILTERSAMPLES 80 65 65 -
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.