- Timestamp:
- 10/09/08 11:48:06 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg
r3017 r3018 78 78 79 79 OUT.color = col; 80 OUT.color.w = color.w; 80 81 // store scaled view vector from now on so wie don't have to normalize for e.g., ssao 82 float3 viewDir = IN.view; 83 const float lenView = length(viewDir); 84 85 OUT.color.w = color.w / lenView; 81 86 82 87 return OUT; … … 160 165 /// reconstruct position from the eye space depth 161 166 float3 viewDir = IN.view; 167 const float lenView = length(viewDir); 168 viewDir /= lenView; 169 162 170 const float eyeDepth = tex2Dlod(colors, float4(IN.texCoord, 0, 0)).w; 163 171 … … 195 203 OUT.color = useShading ? (ambient + diffuse) * color : color; 196 204 197 OUT.color.w = color.w; 205 // store scaled view vector from now on so wie don't have to normalize for e.g., ssao 206 OUT.color.w = color.w / lenView; 198 207 199 208 return OUT;
Note: See TracChangeset
for help on using the changeset viewer.