Changeset 3004 for GTP/trunk/App/Demos/Vis/FriendlyCulling
- Timestamp:
- 10/03/08 20:30:08 (16 years ago)
- Location:
- GTP/trunk/App/Demos/Vis/FriendlyCulling/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp
r3003 r3004 683 683 ) 684 684 { 685 #ifdef USE_3D_SSAO685 //#ifdef USE_3D_SSAO 686 686 // bias from [-1, 1] to [0, 1] 687 687 static Matrix4x4 biasMatrix(0.5f, 0.0f, 0.0f, 0.5f, … … 693 693 694 694 cgGLSetMatrixParameterfc(sModelViewProjMatrixParam, (const float *)m.x); 695 #endif695 //#endif 696 696 697 697 cgGLSetMatrixParameterfc(sOldModelViewProjMatrixParam, (const float *)oldProjViewMatrix.x); -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao.cg
r3001 r3004 149 149 uniform sampler2D oldTex, 150 150 const uniform float4x4 oldModelViewProj, 151 const uniform float4x4 modelViewProj, 151 152 uniform float maxDepth, 152 153 uniform float temporalCoherence, … … 188 189 #endif 189 190 190 // the current depth 191 const float currentDepth = centerPosition.w; 191 // get the current depth 192 //const float currentDepth = centerPosition.w; 193 194 // apply modelview matrix 195 float4 currentPos = mul(modelViewProj, realPos); 196 currentPos /= currentPos.w; 197 const float currentDepth = currentPos.z; 192 198 193 199 … … 200 206 201 207 /////////// 202 //-- reprojection from new frame into old one 203 204 // note: could be done using eye space depth values 205 float4 oldPos = mul(oldModelViewProj, realPos); 206 207 const float4 projPos = oldPos / oldPos.w; 208 //-- reprojection new frame into old one 209 210 // calculate projected depth 211 float4 projPos = mul(oldModelViewProj, realPos); 212 projPos /= oldPos.w; 208 213 209 214 // the current depth projected into the old frame
Note: See TracChangeset
for help on using the changeset viewer.