- Timestamp:
- 04/13/09 21:44:00 (16 years ago)
- Location:
- GTP/trunk/App/Demos/Vis/FriendlyCulling/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp
r3345 r3347 432 432 mDownSampleFbo->AddColorBuffer(ColorBufferObject::RGB_FLOAT_16, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_LINEAR); 433 433 434 434 435 for (int i = 0; i < 2; ++ i) 435 436 { … … 928 929 929 930 // the neighbouring texels 930 float xOffs = 1.0f / fbo->GetWidth();931 float yOffs = 1.0f / fbo->GetHeight();931 const float xOffs = 1.0f / fbo->GetWidth(); 932 const float yOffs = 1.0f / fbo->GetHeight(); 932 933 933 934 sCgAntiAliasingProgram->SetTexture(0, colorsTex); … … 1382 1383 gluOrtho2D(0, 1, 0, 1); 1383 1384 1384 1385 1385 glMatrixMode(GL_MODELVIEW); 1386 1386 glPushMatrix(); 1387 1387 glLoadIdentity(); 1388 1389 1388 1390 1389 glPushAttrib(GL_VIEWPORT_BIT); -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaderenv.h
r3346 r3347 8 8 #define NUM_PRECOMPUTED_SAMPLES 4096 9 9 10 #define NUM_SAMPLES 810 //#define NUM_SAMPLES 8 11 11 //#define NUM_SAMPLES 16 12 12 //#define NUM_SAMPLES 24 13 //#define NUM_SAMPLES 48 13 #define NUM_SAMPLES 32 14 14 15 15 //#define MIN_SAMPLES 48 -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/combineSsaoSep.cg
r3343 r3347 250 250 251 251 //OUT.illum_col.xyz = float3(ao.w * 5e-1f, 0, 0); 252 //OUT.illum_col.xyz = float3(ao. z * 1e-1f);252 //OUT.illum_col.xyz = float3(ao.y * 1e-2f); 253 253 //OUT.illum_col.xyz = float3(ao.y * 1e-1f);//, 0, 0); 254 254 //OUT.illum_col.xyz = ao.xyz; -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg
r3345 r3347 255 255 const float4 oldPixel = tex2Dlod(oldTex, float4(oldTexCoords, .0f, .0f)); 256 256 //const float oldDiff = tex2Dlod(myTex, float4(oldTexCoords, .0f, .0f)).x; 257 const float oldDiff = tex2Dlod(myTex, float4(oldTexCoords, .0f, .0f)).z;257 const float oldDiff = oldPixel.z;//tex2Dlod(myTex, float4(oldTexCoords, .0f, .0f)).z; 258 258 259 259 // calculate eye space position of sample in old frame … … 306 306 isPixelValid = pixelIsValid; 307 307 } 308 //isPixelValid = pixelIsValid; 308 309 309 310 return float2(isPixelValid, abs(oldEyeSpaceDepth - projectedEyeSpaceDepth)); -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao.cg
r3346 r3347 154 154 else 155 155 { 156 w = .0f;156 w = .0f; 157 157 idx = .0f; 158 158 } 159 159 160 return float3(ssao, w, idx);160 return float3(ssao, idx, w); 161 161 } 162 162 … … 201 201 tex2Dlod(samples, float4((0.5f + i + idx) / NUM_PRECOMPUTED_SAMPLES, 0.5f, .0f, .0f)).xy; 202 202 203 203 204 //////////////////// 204 205 //-- add random noise: reflect around random normal vector … … 207 208 if (convergence < SSAO_CONVERGENCE_THRESHOLD) 208 209 { 209 float2 mynoise = tex2Dlod(noiseTex, float4(IN.texCoord * 4.0f, 0, 0)).xy;210 float2 mynoise = tex2Dlod(noiseTex, float4(IN.texCoord * 4.0f, .0f, .0f)).xy; 210 211 //offset = myreflect(samples[i], mynoise); 211 212 //offset = myrotate(samples[i], mynoise.x); … … 584 585 else if (ao.y > partlyResetThres) 585 586 { 587 if (oldIdx > 4.0f * NUM_SAMPLES) oldIdx = 0; 586 588 //oldWeight = min(oldWeight, 4.0f * NUM_SAMPLES); oldIdx = oldWeight; 587 //oldWeight =.0f; oldIdx = .0f;589 oldWeight = oldIdx;//.0f; oldIdx = .0f; 588 590 } 589 591 }
Note: See TracChangeset
for help on using the changeset viewer.