Ignore:
Timestamp:
10/31/08 15:08:25 (16 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/globillum.cg

    r3034 r3084  
    8989#if 1 
    9090                //////////////////// 
    91                 // add random noise: reflect around random normal vector (warning: slow!) 
     91                // add random noiseTex: reflect around random normal vector (warning: slow!) 
    9292                float2 mynoise = tex2D(noiseTexture, IN.texCoord.xy).xy; 
    9393                float2 offsetTransformed = myreflect(offset, mynoise); 
     
    151151                   uniform sampler2D colors, 
    152152                   uniform sampler2D normals, 
    153                    uniform sampler2D noise, 
     153                   uniform sampler2D noiseTex, 
    154154                   uniform float2 samples[NUM_SAMPLES], 
    155155                   uniform sampler2D oldSsaoTex, 
     
    187187        currentPos /= currentPos.w; 
    188188         
    189         const float currentDepth = currentPos.z * 1e-3f; 
     189        const float currentDepth = currentPos.z * PRECISION_SCALE; 
    190190 
    191191        /////////// 
    192192        //-- compute color bleeding + ao 
    193193 
    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)); 
    195195         
    196196 
     
    204204 
    205205        // the current depth projected into the old frame 
    206         const float projDepth = projPos.z * 1e-3f; 
     206        const float projDepth = projPos.z * PRECISION_SCALE; 
    207207 
    208208        // fit from unit cube into 0 .. 1 
     
    223223        //const float oldNumSamples = oldSsao.y; 
    224224         
    225         if (//(temporalCoherence > 0.0f) && 
     225        if ((temporalCoherence > 1e-6f) && 
    226226                (tex.x >= 0.0f) && (tex.x < 1.0f) &&  
    227227                (tex.y >= 0.0f) && (tex.y < 1.0f) &&  
Note: See TracChangeset for help on using the changeset viewer.