- Timestamp:
- 08/31/08 17:18:37 (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/Camera.cpp
r2889 r2890 186 186 const Vector3 fc = mPosition + view * z_far; 187 187 188 const Vector3 up = -GetUpVector();189 const Vector3 right = -GetRightVector();188 const Vector3 up = GetUpVector(); 189 const Vector3 right = GetRightVector(); 190 190 191 191 Vector3 t1, t2; -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SsaoShader.cpp
r2889 r2890 551 551 glTexCoord2f(0, 1); glMultiTexCoord3fARB(GL_TEXTURE1_ARB, bl.x, bl.y, bl.z); glVertex3f(-new_offs, new_offs, -0.5f); 552 552 */ 553 glTexCoord2f(0, 0); glMultiTexCoord3fARB(GL_TEXTURE1_ARB, tr.x, tr.y, tr.z); glVertex3f(-new_offs, -new_offs, -0.5f);554 glTexCoord2f(1, 0); glMultiTexCoord3fARB(GL_TEXTURE1_ARB, tl.x, tl.y, tl.z); glVertex3f( new_offs, -new_offs, -0.5f);555 glTexCoord2f(1, 1); glMultiTexCoord3fARB(GL_TEXTURE1_ARB, bl.x, bl.y, bl.z); glVertex3f( new_offs, new_offs, -0.5f);556 glTexCoord2f(0, 1); glMultiTexCoord3fARB(GL_TEXTURE1_ARB, br.x, br.y, br.z); glVertex3f(-new_offs, new_offs, -0.5f);553 glTexCoord2f(0, 0); glMultiTexCoord3fARB(GL_TEXTURE1_ARB, bl.x, bl.y, bl.z); glVertex3f(-new_offs, -new_offs, -0.5f); 554 glTexCoord2f(1, 0); glMultiTexCoord3fARB(GL_TEXTURE1_ARB, br.x, br.y, br.z); glVertex3f( new_offs, -new_offs, -0.5f); 555 glTexCoord2f(1, 1); glMultiTexCoord3fARB(GL_TEXTURE1_ARB, tr.x, tr.y, tr.z); glVertex3f( new_offs, new_offs, -0.5f); 556 glTexCoord2f(0, 1); glMultiTexCoord3fARB(GL_TEXTURE1_ARB, tl.x, tl.y, tl.z); glVertex3f(-new_offs, new_offs, -0.5f); 557 557 558 558 glEnd(); … … 577 577 mCamera->ComputePoints(ftl, ftr, fbl, fbr, ntl, ntr, nbl, nbr); 578 578 579 #if 1580 581 579 bl = Normalize(nbl - fbl); 582 580 br = Normalize(nbr - fbr); 583 581 tl = Normalize(ntl - ftl); 584 582 tr = Normalize(ntr - ftr); 585 586 #else // just take camera direction587 588 bl = -Normalize(mCamera->GetDirection());589 br = -Normalize(mCamera->GetDirection());590 tl = -Normalize(mCamera->GetDirection());591 tr = -Normalize(mCamera->GetDirection());592 593 #endif594 595 // pack into 0 .. 1596 /*bl = bl * 0.5f + 0.5f;597 br = br * 0.5f + 0.5f;598 tl = tl * 0.5f + 0.5f;599 tr = tr * 0.5f + 0.5f;*/600 583 } 601 584 -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao.cg
r2889 r2890 94 94 } 95 95 96 //return max(0.0f, 1.0f - total_ao);97 return saturate(dot(currentViewDir, currentNormal));96 return max(0.0f, 1.0f - total_ao); 97 //return saturate(dot(currentViewDir, currentNormal)); 98 98 } 99 99 … … 125 125 /// the current view direction 126 126 //float3 viewDir = normalize(IN.view * 2.0f - float3(1.0f)); 127 float3 viewDir = IN.view;127 float3 viewDir = normalize(IN.view); 128 128 129 129 // the current world position
Note: See TracChangeset
for help on using the changeset viewer.