Ignore:
Timestamp:
09/26/08 18:31:24 (16 years ago)
Author:
mattausch
Message:

cannot read mipmap, but stayed on gpu

Location:
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders
Files:
3 edited

Legend:

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

    r2974 r2976  
    8787        float4 s3 = tex2Dlod(colors, float4(offset + IN.lb.xy * w, 0, 0)); 
    8888 
    89         float4 sc = tex2Dlod(colors, float4(IN.c.xy, 0, 0)); 
     89        float4 centerColor = tex2Dlod(colors, float4(IN.c.xy, 0, 0)); 
    9090 
    91         float4 col = (s0 + s1 + s2 + s3 + sc) * 0.2f; 
     91        float4 col = (s0 + s1 + s2 + s3 + centerColor) * 0.2f; 
    9292        //return (s0 + s1 + s2 + s3) * 0.25f; 
     93 
     94        col.w = centerColor.w; 
    9395 
    9496        return col; 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg

    r2975 r2976  
    6464                   uniform sampler2D positions, 
    6565                   uniform sampler2D normals, 
    66                    uniform float3 lightDir 
     66                   uniform float3 lightDir, 
     67                   uniform sampler2D oldColors 
    6768                   ) 
    6869{ 
     
    8687        //-- write out logaritmic luminance for tone mapping 
    8788 
     89        float4 oldColor = tex2Dlod(colors, float4(IN.texCoord.xy, 0, 99)); 
     90 
    8891        const float3 w = float3(0.299f, 0.587f, 0.114f); 
    8992 
     
    9497        float logLumScaled = logLum * INV_LOGLUM_RANGE - logLumOffset; 
    9598 
    96         OUT.color.w = logLumScaled; 
     99        const static float factor = 0.2f; 
     100         
     101        OUT.color.w = lerp(oldColor.w, logLumScaled, factor); 
    97102 
    98103        return OUT; 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/globillum.cg

    r2975 r2976  
    189189                // check if something changed in the surrounding area 
    190190                && (oldNumSamples > 0.2 * gi.ao.y) 
    191                 && (oldAvgDepth / newAvgDepth > 0.99) 
     191                //&& (oldAvgDepth / newAvgDepth > 0.99) 
    192192                ) 
    193193        { 
Note: See TracChangeset for help on using the changeset viewer.