Changeset 2995 for GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders
- Timestamp:
- 10/03/08 02:46:30 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao.cg
r2993 r2995 149 149 uniform float3 br, 150 150 uniform float3 tl, 151 uniform float3 tr 151 uniform float3 tr, 152 const uniform float4x4 oldModelView 152 153 ) 153 154 { … … 197 198 float4 oldPos = mul(oldModelViewProj, realPos); 198 199 200 // the depth projected into the old frame 199 201 const float newDepth = oldPos.z / oldPos.w; 200 202 203 // fit from unit cube into 0 .. 1 201 204 float2 tex = (oldPos.xy / oldPos.w) * 0.5f + 0.5f; 205 206 // optain the sample frpm last frame 202 207 float4 oldCol = tex2D(oldTex, tex); 203 208 … … 212 217 // the number of valid samples in this frame 213 218 const float newNumSamples = ao.y; 219 214 220 215 221 if (//(temporalCoherence > 0) && … … 219 225 // if visibility changed in the surrounding area we have to recompute 220 226 && (oldNumSamples > 0.8f * newNumSamples) 221 //&& (oldAvgDepth / newAvgDepth > 0.99)222 227 ) 223 228 { … … 225 230 newWeight = oldWeight + 1.0f; 226 231 OUT.illum_col.xy = (ao.xy + oldCol.xy * oldWeight) / newWeight; 227 228 232 //if (!(oldNumSamples > ao.y - 1.5f)) newWeight = 0; 229 233 }
Note: See TracChangeset
for help on using the changeset viewer.