- Timestamp:
- 10/31/08 15:08:25 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/globillum.cg
r3034 r3084 89 89 #if 1 90 90 //////////////////// 91 // add random noise : reflect around random normal vector (warning: slow!)91 // add random noiseTex: reflect around random normal vector (warning: slow!) 92 92 float2 mynoise = tex2D(noiseTexture, IN.texCoord.xy).xy; 93 93 float2 offsetTransformed = myreflect(offset, mynoise); … … 151 151 uniform sampler2D colors, 152 152 uniform sampler2D normals, 153 uniform sampler2D noise ,153 uniform sampler2D noiseTex, 154 154 uniform float2 samples[NUM_SAMPLES], 155 155 uniform sampler2D oldSsaoTex, … … 187 187 currentPos /= currentPos.w; 188 188 189 const float currentDepth = currentPos.z * 1e-3f;189 const float currentDepth = currentPos.z * PRECISION_SCALE; 190 190 191 191 /////////// 192 192 //-- compute color bleeding + ao 193 193 194 GiStruct gi = globIllum(IN, colors, noise , samples, normal, eyeSpacePos, w, bl, br, tl, tr, normalize(IN.view));194 GiStruct gi = globIllum(IN, colors, noiseTex, samples, normal, eyeSpacePos, w, bl, br, tl, tr, normalize(IN.view)); 195 195 196 196 … … 204 204 205 205 // the current depth projected into the old frame 206 const float projDepth = projPos.z * 1e-3f;206 const float projDepth = projPos.z * PRECISION_SCALE; 207 207 208 208 // fit from unit cube into 0 .. 1 … … 223 223 //const float oldNumSamples = oldSsao.y; 224 224 225 if ( //(temporalCoherence > 0.0f) &&225 if ((temporalCoherence > 1e-6f) && 226 226 (tex.x >= 0.0f) && (tex.x < 1.0f) && 227 227 (tex.y >= 0.0f) && (tex.y < 1.0f) &&
Note: See TracChangeset
for help on using the changeset viewer.