Changeset 3367
- Timestamp:
- 04/30/09 16:22:48 (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
r3362 r3367 518 518 "samples", "bl", "br", "tl", "tr", 519 519 "modelViewProj", "oldModelViewProj", "oldEyePos", "oldbl", "oldbr", 520 "oldtl", "oldtr", "attribsTex", "kernelRadius", "sampleIntensity"}; 521 522 sCgSsaoProgram->AddParameters(ssaoParams, 0, 20); 520 "oldtl", "oldtr", "attribsTex", "kernelRadius", "sampleIntensity", 521 "dummyIdx"}; 522 523 sCgSsaoProgram->AddParameters(ssaoParams, 0, 21); 523 524 524 525 string giParams[] = … … 830 831 // read the second buffer, write to the first buffer 831 832 mIllumFbo->Bind(); 832 glDrawBuffers( 2, mrt + mIllumFboIndex);833 glDrawBuffers(1, mrt + mIllumFboIndex); 833 834 834 835 int i = 0; … … 892 893 sCgSsaoProgram->SetValue1f(i ++, mKernelRadius); 893 894 sCgSsaoProgram->SetValue1f(i ++, mSampleIntensity * mKernelRadius); 895 896 static int dummyIdx = 0; 897 sCgSsaoProgram->SetValue1f(i ++, dummyIdx); 898 dummyIdx += NUM_SAMPLES; 894 899 895 900 DrawQuad(sCgSsaoProgram); -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp
r3365 r3367 828 828 //fbo->AddColorBuffer(ColorBufferObject::RGB_UBYTE, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_NEAREST); 829 829 // buffer holding the difference vector to the old frame 830 fbo->AddColorBuffer(ColorBufferObject::RGB_FLOAT_ 32, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_LINEAR);830 fbo->AddColorBuffer(ColorBufferObject::RGB_FLOAT_16, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_LINEAR); 831 831 //fbo->AddColorBuffer(ColorBufferObject::RGB_UBYTE, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_LINEAR); 832 832 // another color buffer -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaderenv.h
r3363 r3367 16 16 #define NUM_SAMPLES 48 17 17 18 #define MIN_SAMPLES 819 //#define MIN_SAMPLES 4818 //#define MIN_SAMPLES 8 19 #define MIN_SAMPLES 48 20 20 21 21 #define DISTANCE_SCALE 1e-2f … … 74 74 #define PERFORMANCE_TEST 1 75 75 76 #define USE_OPTIMIZATION 076 #define USE_OPTIMIZATION 1 77 77 78 78 -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao.cg
r3366 r3367 20 20 { 21 21 float4 illum_col: COLOR0; 22 float4 col: COLOR1;23 22 }; 24 23 … … 549 548 // they possibly have any influence on the ao 550 549 551 if (cosAngle >= 0) 550 const float3 oldVector = oldSamplePos - oldPos; 551 const float oldDistance = length(oldVector); 552 const float cosAngle2 = dot(oldVector, normal); 553 554 if ((cosAngle >= 0) || (cosAngle2 >= 0)) 552 555 { 553 556 const float oldDistance = length(oldSamplePos - oldPos); … … 615 618 uniform float kernelRadius, 616 619 uniform float sampleIntensity 620 ,uniform float dummyIdx 617 621 ) 618 622 { … … 757 761 OUT.illum_col.w = eyeSpaceDepth; 758 762 759 // this value can be used to check if this pixel belongs to a moving object760 OUT.col.x = SqrLen(diffVec);761 //OUT.illum_col.z = SqrLen(diffVec);762 763 763 #else 764 764
Note: See TracChangeset
for help on using the changeset viewer.