Changeset 2941
- Timestamp:
- 09/13/08 13:20:05 (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
r2936 r2941 53 53 { 54 54 Vector3 up = Vector3::UNIT_Z(); 55 Vector3 right = Normalize(CrossProd(dir, up)); 56 up = Normalize(CrossProd(right, dir)); 57 58 mBaseOrientation = Matrix4x4(right, up, -dir); 55 //Vector3 right = Normalize(CrossProd(dir, up)); 56 //up = Normalize(CrossProd(right, dir)); 57 58 //mBaseOrientation = Matrix4x4(right, up, -dir); 59 mBaseOrientation = MyLookAt(Vector3::ZERO(), dir, up);//Matrix4x4(right, up, -dir); 59 60 mViewOrientation = mBaseOrientation; 60 61 } -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ShadowMapping.cpp
r2940 r2941 605 605 glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); 606 606 607 //glDisable(GL_CULL_FACE); 608 607 609 glPolygonOffset(1.0f, 2000.0f); 608 610 glEnable(GL_POLYGON_OFFSET_FILL); 611 //glDisable(GL_POLYGON_OFFSET_FILL); 609 612 610 613 glShadeModel(GL_FLAT); … … 757 760 DEL_PTR(hpoly); 758 761 759 //glEnable(GL_CULL_FACE);760 762 761 763 glEnable(GL_LIGHTING); -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg
r2928 r2941 104 104 lightSpacePos /= lightSpacePos.w; 105 105 106 float shadowDepth[9];106 /*float shadowDepth[9]; 107 107 108 108 float w = sampleWidth; 109 109 110 110 // pcf sampling using 3 x 3 tab 111 112 111 shadowDepth[0] = tex2D(shadowMap, lightSpacePos.xy).x; 113 112 … … 122 121 shadowDepth[8] = tex2D(shadowMap, lightSpacePos.xy - float2( 0, -w)).x; 123 122 124 OUT.color = col;125 123 126 124 float depth = lightSpacePos.z; … … 134 132 135 133 d /= 9.0f; 136 137 /*if ((amb < 0.9) && // hack: prevent shadowing the sky 138 (lightSpacePos.z / lightSpacePos.w > shadowDepth)) 134 */ 135 136 OUT.color = col; 137 138 float shadowDepth = tex2D(shadowMap, lightSpacePos.xy).x; 139 140 if ((amb < 0.9f) && // hack: prevent shadowing the sky 141 (lightSpacePos.z > shadowDepth)) 139 142 { 140 143 OUT.color *= 0.1f; 141 } */142 143 if (amb < 0.9 ) // hack: prevent shadowing the sky144 } 145 /* 146 if (amb < 0.9f) // hack: prevent shadowing the sky 144 147 { 145 148 const float x = 0.1f; 146 149 OUT.color *= x + (1.0f - x) * (1.0f - d); 147 150 } 148 151 */ 149 152 //OUT.color = lightSpacePos;//float4(lightSpacePos.z / lightSpacePos.w); 150 153 //OUT.color = float4(shadowDepth);
Note: See TracChangeset
for help on using the changeset viewer.