- Timestamp:
- 10/03/08 10:09:24 (16 years ago)
- Location:
- GTP/trunk/App/Demos/Vis/FriendlyCulling/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp
r2995 r2997 657 657 cgGLSetMatrixParameterfc(sOldModelViewProjMatrixParam, (const float *)oldProjViewMatrix.x); 658 658 659 cgGLSetMatrixParameterfc(sModelViewProjMatrixParam, (const float *)projViewMatrix.x);660 661 659 GLuint colorsTex = fbo->GetColorBuffer(colorBufferIdx)->GetTexture(); 662 660 GLuint positionsTex = fbo->GetColorBuffer(1)->GetTexture(); -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp
r2995 r2997 1194 1194 1195 1195 ShadowMap *sm = showShadowMap ? shadowMap : NULL; 1196 //ssaoShader->Render(fbo, oldViewProjMatrix, matProjectionView, ssaoTempCohFactor, light, useHDR, sm); 1197 ssaoShader->Render(fbo, oldViewProjMatrix, oldMatViewing, ssaoTempCohFactor, light, useHDR, sm); 1196 ssaoShader->Render(fbo, oldViewProjMatrix, matProjectionView, ssaoTempCohFactor, light, useHDR, sm); 1198 1197 } 1199 1198 -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao.cg
r2996 r2997 149 149 uniform float3 br, 150 150 uniform float3 tl, 151 uniform float3 tr, 152 const uniform float4x4 oldModelView 151 uniform float3 tr 153 152 ) 154 153 { … … 163 162 float w = norm.w; 164 163 165 #if 1166 164 // the current world position 167 165 const float4 centerPosition = tex2D(positions, IN.texCoord.xy); 166 167 #if 1 168 168 const float2 ao = ssao(IN, positions, noiseTexture, samples, normal, centerPosition, w, eyePos, bl, br, tl, tr); 169 169 170 170 #else 171 171 /// reconstruct position from the eye space depth 172 float3 viewDir = normalize(IN.view);172 /* float3 viewDir = normalize(IN.view); 173 173 const float eyeDepth = tex2D(colors, IN.texCoord.xy).w; 174 174 float4 centerPosition; 175 175 176 centerPosition.xyz = eyePos - viewDir * eyeDepth; 176 177 */ 177 178 const float2 ao = ssao(IN, colors, noiseTexture, samples, normal, centerPosition, w, eyePos, bl, br, tl, tr); 178 179 … … 194 195 195 196 // note: could be done using eye space depth values 196 // by storing the position from last frame and the old model view matrix197 198 //float4 oldPos = mul(oldModelViewProj, realPos);199 197 float4 oldPos = mul(oldModelViewProj, realPos); 200 198 201 //const float projEyeDepth =202 199 // the current depth projected into the old frame 203 200 const float projDepth = oldPos.z / oldPos.w;
Note: See TracChangeset
for help on using the changeset viewer.