- Timestamp:
- 04/10/09 15:46:35 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao.cg
r3331 r3339 16 16 }; 17 17 18 19 /*struct pixel20 {21 float4 illum_col: COLOR0;22 };23 */24 18 25 19 struct pixel2 … … 251 245 // angle between current normal and direction to sample controls AO intensity. 252 246 //const float cosAngle2 = dot(-dirSample, sampleNormal); 253 const float cosAngle2 = .5f + dot(sampleNormal, -normal) * 0.5f;247 const float cosAngle2 = .5f + dot(sampleNormal, -normal) * .5f; 254 248 255 249 dirSample *= minDist; … … 257 251 258 252 //const float aoContrib = (1.0f > lengthToSample) ? occlusionPower(9e-2f, DISTANCE_SCALE + lengthToSample): .0f; 259 total_ao += max(cosAngle, .0f) * max(cosAngle2, .0f) * aoContrib; 253 //total_ao += max(cosAngle, .0f) * max(cosAngle2, .0f) * aoContrib; 254 total_ao += max(cosAngle, .0f) * cosAngle2 * aoContrib; 260 255 261 256 ++ numSamples; … … 274 269 #if 1 275 270 const float tooFarAway = step(0.5f, lengthToSample - changeFactor); 276 277 271 const float partlyResetThres = 1.0f; 278 272
Note: See TracChangeset
for help on using the changeset viewer.