Ignore:
Timestamp:
10/02/08 17:34:10 (16 years ago)
Author:
mattausch
Message:

tone mapping working with using reconstructed depth

File:
1 edited

Legend:

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

    r2991 r2992  
    114114        pixel OUT; 
    115115 
     116        float4 color = tex2Dlod(colors, float4(IN.texCoord.xy, 0, 0)); 
     117 
     118        OUT.col = color; 
     119 
    116120        // the old loglum is stored in the hightest mipmap-level 
    117         float4 color = tex2Dlod(colors, float4(IN.texCoord.xy, 0, 0)); 
    118121        float oldLogLum = tex2Dlod(colors, float4(IN.texCoord.xy, 0, MAX_LOD_LEVEL)).w; 
    119122 
     
    127130        float logLumScaled = logLum * INV_LOGLUM_RANGE - logLumOffset; 
    128131 
    129         OUT.color = color; 
     132        if (oldLogLum > 0) 
     133                OUT.col.w = lerp(oldLogLum, logLumScaled, 0.1f); 
     134        else 
     135                OUT.col.w = logLumScaled; 
    130136 
    131         if (oldLogLum > 0) 
    132                 OUT.color.w = lerp(oldLogLum, logLumScaled, 0.1f); 
    133         else 
    134                 OUT.color.w = logLumScaled; 
     137        return OUT; 
    135138} 
Note: See TracChangeset for help on using the changeset viewer.