Changeset 2992 for GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders
- Timestamp:
- 10/02/08 17:34:10 (16 years ago)
- Location:
- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg
r2991 r2992 76 76 // an ambient color term 77 77 float amb = color.w; 78 79 78 float3 normal = normalize(norm.xyz); 80 81 79 float4 col = shade(IN, color, position, normal, amb, lightDir); 82 80 83 81 OUT.color = col; 84 82 85 #if 083 #if 1 86 84 87 85 OUT.color.w = color.w; … … 217 215 //-- write out logaritmic luminance for tone mapping 218 216 219 #if 0 220 217 #if 1 221 218 OUT.color.w = color.w; 222 223 219 #else 224 220 -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao.cg
r2991 r2992 42 42 43 43 44 // reconstruct world space position 44 45 inline float3 ReconstructSamplePosition(float3 eyePos, 45 46 uniform sampler2D colors, … … 47 48 float3 bl, float3 br, float3 tl, float3 tr) 48 49 { 49 /*float eyeSpaceDepth = tex2Dlod(colors, float4(texcoord, 0, SSAO_MIPMAP_LEVEL)).w; 50 51 // reconstruct world space position 50 float eyeSpaceDepth = tex2Dlod(colors, float4(texcoord, 0, SSAO_MIPMAP_LEVEL)).w; 52 51 float3 rotView = normalize(Interpol(texcoord, bl, br, tl, tr)); 53 float3 sample_position = eyePos - rotView * eyeSpaceDepth;*/ 54 float3 sample_position = tex2Dlod(colors, float4(texcoord, 0, SSAO_MIPMAP_LEVEL)).xyz; 52 53 float3 sample_position = eyePos - rotView * eyeSpaceDepth; 54 //float3 sample_position = tex2Dlod(colors, float4(texcoord, 0, SSAO_MIPMAP_LEVEL)).xyz; 55 55 56 56 return sample_position; … … 174 174 175 175 //const float2 ao = ssao(IN, positions, noiseTexture, samples, normal, centerPosition, w, viewDir, eyePos); 176 const float2 ao = ssao(IN, positions, noiseTexture, samples, normal, centerPosition, w, eyePos, bl, br, tl, tr);176 const float2 ao = ssao(IN, colors, noiseTexture, samples, normal, centerPosition, w, eyePos, bl, br, tl, tr); 177 177 178 178 -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/tonemap.cg
r2991 r2992 114 114 pixel OUT; 115 115 116 float4 color = tex2Dlod(colors, float4(IN.texCoord.xy, 0, 0)); 117 118 OUT.col = color; 119 116 120 // the old loglum is stored in the hightest mipmap-level 117 float4 color = tex2Dlod(colors, float4(IN.texCoord.xy, 0, 0));118 121 float oldLogLum = tex2Dlod(colors, float4(IN.texCoord.xy, 0, MAX_LOD_LEVEL)).w; 119 122 … … 127 130 float logLumScaled = logLum * INV_LOGLUM_RANGE - logLumOffset; 128 131 129 OUT.color = color; 132 if (oldLogLum > 0) 133 OUT.col.w = lerp(oldLogLum, logLumScaled, 0.1f); 134 else 135 OUT.col.w = logLumScaled; 130 136 131 if (oldLogLum > 0) 132 OUT.color.w = lerp(oldLogLum, logLumScaled, 0.1f); 133 else 134 OUT.color.w = logLumScaled; 137 return OUT; 135 138 }
Note: See TracChangeset
for help on using the changeset viewer.