Changeset 2978 for GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders
- Timestamp:
- 09/26/08 22:36:20 (16 years ago)
- Location:
- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg
r2977 r2978 87 87 //-- write out logaritmic luminance for tone mapping 88 88 89 float4 oldColor = tex2Dlod(colors, float4(IN.texCoord.xy, 0, 99));89 float4 oldColor = tex2Dlod(colors, float4(IN.texCoord.xy, 0, MAX_LOD_LEVEL)); 90 90 91 91 const float3 w = float3(0.299f, 0.587f, 0.114f); … … 157 157 uniform sampler2D noiseTexture, 158 158 uniform float2 samples[NUM_PCF_TABS], 159 uniform float3 lightDir 159 uniform float3 lightDir, 160 uniform sampler2D oldColors 160 161 ) 161 162 { … … 201 202 OUT.color = (emmisive > 1.5f) ? color: (ambient + diffuse) * color; 202 203 204 203 205 //////////// 204 206 //-- write out logaritmic luminance for tone mapping 205 207 208 float4 oldColor = tex2Dlod(colors, float4(IN.texCoord.xy, 0, MAX_LOD_LEVEL)); 209 206 210 const float3 w = float3(0.299f, 0.587f, 0.114f); 207 211 … … 212 216 float logLumScaled = logLum * INV_LOGLUM_RANGE - logLumOffset; 213 217 214 OUT.color.w = logLumScaled; 218 if (oldColor.w > 0) 219 OUT.color.w = lerp(oldColor.w, logLumScaled, 0.2f); 220 else 221 OUT.color.w = logLumScaled; 215 222 216 223 return OUT; -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao.cg
r2975 r2978 52 52 float numSamples = 0; 53 53 54 // avoid singularity of 55 centerPosition.xyz += currentNormal * 1e-4f; 56 54 57 for (int i = 0; i < NUM_SAMPLES; ++ i) 55 58 { … … 82 85 const float cos_angle = max(dot(direction_to_sample, currentNormal), 0.0f); 83 86 84 // distance between current position and sample position controls AO intensity.85 87 const float distance_intensity = 86 88 (SAMPLE_INTENSITY * DISTANCE_SCALE) / (DISTANCE_SCALE + length_to_sample * length_to_sample);
Note: See TracChangeset
for help on using the changeset viewer.