Changeset 2941 for GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders
- Timestamp:
- 09/13/08 13:20:05 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.