- Timestamp:
- 02/25/09 15:51:45 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao.cg
r3326 r3327 179 179 sampler2D colors, 180 180 sampler2D noiseTex, 181 //float2 samples[NUM_PRECOMPUTED_SAMPLES], 181 182 sampler2D samples, 182 183 float3 normal, … … 204 205 205 206 const float2 ssaoOffset = tex2Dlod(samples, float4((0.5f + i + idx) / NUM_PRECOMPUTED_SAMPLES, 0.5f, .0f, .0f)).xy; 206 207 //const float2 ssaoOffset = samples[i]; 207 208 208 209 //////////////////// … … 455 456 uniform sampler2D noiseTex, 456 457 uniform sampler2D samples, 458 //uniform float2 samples[NUM_PRECOMPUTED_SAMPLES], 457 459 uniform sampler2D oldTex, 458 460 uniform float4x4 modelViewProj, … … 511 513 512 514 const float oldSsao = temporalVals.x; 513 float oldWeight = temporalVals.y;514 float oldIdx =temporalVals.z;515 const float oldWeight = temporalVals.y; 516 const float oldIdx = 0;//temporalVals.z; 515 517 516 518 float3 ao; … … 520 522 { 521 523 if (0) 524 { 522 525 ao = ssao(IN, colors, noiseTex, samples, normal, eyeSpacePos.xyz, scaleFactor, bl, br, tl, tr, normalize(viewDir), oldWeight, sampleIntensity, isMovingObject); 526 } 523 527 else 528 { 524 529 ao = ssao2(IN, colors, noiseTex, samples, normal, eyeSpacePos.xyz, scaleFactor, 525 530 bl, br, tl, tr, normalize(viewDir), oldWeight, sampleIntensity, 526 531 isMovingObject, normals, oldIdx); 532 } 527 533 } 528 534 else … … 574 580 OUT.illum_col.w = eyeSpaceDepth; 575 581 582 //if (OUT.illum_col.z > 1000) OUT.illum_col.z = 0; 583 576 584 // this value can be used to check if this pixel belongs to a moving object 577 585 OUT.col.x = SqrLen(diffVec); 578 586 //OUT.illum_col.z = SqrLen(diffVec); 579 587 580 OUT.illum_col.xyz = normal.xyz;588 //OUT.illum_col.xyz = normal.xyz; 581 589 return OUT; 582 590 }
Note: See TracChangeset
for help on using the changeset viewer.