- Timestamp:
- 01/18/09 02:25:26 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg
r3230 r3284 89 89 for (int i = 0; i < NUM_PCF_TABS; ++ i) 90 90 { 91 const float2 offset = samples[i];91 float2 offset; 92 92 const float w = weights[i]; 93 93 … … 96 96 //-- add random noise: reflect around random normal vector (warning: slow!) 97 97 98 float2 mynoise = tex2D(noiseTexture, IN.texCoord).xy; 99 const float2 offsetTransformed = myreflect(offset, mynoise); 98 float2 mynoise = tex2D(noiseTexture, IN.texCoord * 4.0f).xy; 99 //offset = myreflect(samples[i], mynoise); 100 offset = myrotate(samples[i], mynoise.x); 100 101 #else 101 const float2 offsetTransformed = offset;102 offset = samples[i]; 102 103 #endif 103 104 // weight with projected coordinate to reach similar kernel size for near and far 104 float2 texcoord = lightSpacePos + offset Transformed* scale;105 float2 texcoord = lightSpacePos + offset * scale; 105 106 106 107 float shadowDepth = tex2D(shadowMap, texcoord).x;
Note: See TracChangeset
for help on using the changeset viewer.