Changeset 3092 for GTP/trunk/App/Demos
- Timestamp:
- 11/03/08 17:28:15 (16 years ago)
- Location:
- GTP/trunk/App/Demos/Vis/FriendlyCulling/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp
r3090 r3092 269 269 //-- the flip-flop fbos 270 270 271 mIllumFbo = new FrameBufferObject(w / 2, h / 2, FrameBufferObject::DEPTH_NONE); 271 // mIllumFbo = new FrameBufferObject(w / 2, h / 2, FrameBufferObject::DEPTH_NONE); 272 mIllumFbo = new FrameBufferObject(w, h, FrameBufferObject::DEPTH_NONE); 272 273 mFBOs.push_back(mIllumFbo); 273 274 … … 278 279 } 279 280 280 mDownSampleFbo = new FrameBufferObject(w / 2, h / 2, FrameBufferObject::DEPTH_NONE); 281 //mDownSampleFbo = new FrameBufferObject(w / 2, h / 2, FrameBufferObject::DEPTH_NONE); 282 mDownSampleFbo = new FrameBufferObject(w, h, FrameBufferObject::DEPTH_NONE); 281 283 mDownSampleFbo->AddColorBuffer(ColorBufferObject::RGBA_FLOAT_32, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_LINEAR); 282 284 // downsample buffer for the normal texture -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaderenv.h
r3089 r3092 42 42 #define MAX_LOD_LEVEL 10 43 43 44 #define MIN_DEPTH_DIFF 1e- 2f45 #define PRECISION_SCALE 1e- 2f44 #define MIN_DEPTH_DIFF 1e-3f 45 #define PRECISION_SCALE 1e-1f 46 46 47 47 // burnout -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/antialiasing.cg
r3026 r3092 26 26 ): COLOR 27 27 { 28 //return tex2D(colors, IN.c.xy);28 return tex2D(colors, IN.c.xy); 29 29 30 30 // normal discontinuity filter -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg
r3089 r3092 145 145 uniform float4x4 shadowMatrix, 146 146 uniform float sampleWidth, 147 uniform sampler2D noise ,147 uniform sampler2D noiseTex, 148 148 uniform float2 samples[NUM_PCF_TABS], 149 149 uniform float weights[NUM_PCF_TABS], … … 189 189 lightSpacePos /= lightSpacePos.w; 190 190 191 float shadowTerm = CalcShadowTerm(IN, shadowMap, sampleWidth, lightSpacePos.xy, lightSpacePos.z, samples, weights, noise );192 //float shadowTerm = CalcShadowTerm(IN, shadowMap, sampleWidth, lightSpacePos.xy, lightSpacePos.z, samples, noise );191 float shadowTerm = CalcShadowTerm(IN, shadowMap, sampleWidth, lightSpacePos.xy, lightSpacePos.z, samples, weights, noiseTex); 192 //float shadowTerm = CalcShadowTerm(IN, shadowMap, sampleWidth, lightSpacePos.xy, lightSpacePos.z, samples, noiseTex); 193 193 194 194 diffuse *= shadowTerm; … … 235 235 const float currentDepth = currentPos.z * precisionScale; 236 236 237 const float2 ao = ssao(IN, colors, noise, samples, normal, eyeSpacePos, w, bl, br, tl, tr, normalize(viewDir)); 237 const float2 ao = ssao(IN, colors, noise, samples, normal, 238 eyeSpacePos, w, bl, br, tl, tr, normalize(viewDir)); 238 239 239 240 -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/mrt.cg
r3089 r3092 42 42 43 43 44 //#pragma position_invariant vtx44 #pragma position_invariant vtx 45 45 46 46 vtxout vtx(vtxin IN) -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao.cg
r3091 r3092 60 60 return samplePos; 61 61 } 62 63 #pragma position_invariant temporalSmoothing64 62 65 63 … … 137 135 uniform float3 oldbr, 138 136 uniform float3 oldtl, 139 uniform float3 oldtr ,140 const uniform float4x4 inverseModelTrafo,141 float id137 uniform float3 oldtr 138 //,const uniform float4x4 inverseModelTrafo 139 //, float id 142 140 ) 143 141 { … … 147 145 //-- compute reprojection for temporal smoothing 148 146 149 float4x4 trafo; 150 147 //float4x4 trafo; 151 148 // dynamic object 152 if (id > 20) 153 trafo = oldModelViewProj; 154 else 155 trafo = inverseModelTrafo * oldModelViewProj; 149 //if (id > 20) trafo = oldModelViewProj; 150 //else trafo = inverseModelTrafo * oldModelViewProj; 156 151 157 152 // reproject into old frame and calculate projected depth … … 174 169 175 170 const float depthDif = length(oldSamplePos - worldPos.xyz); 176 171 //const float dummy5 = abs(oldEyeSpaceDepth - eyeSpaceDepth); 172 const float dummy5 = length(oldTexCoords - texcoord0) * 1e5f; 173 //const float dummy5 = depthDif; 174 177 175 float notValid = 0.5f; 178 176 … … 225 223 illum_col.y = newWeight; 226 224 illum_col.w = eyeSpaceDepth; 227 225 illum_col.y = dummy5; 226 228 227 return illum_col; 229 228 } … … 394 393 395 394 float4 col = tex2Dlod(colors, float4(IN.texCoord, 0, 0)); 396 float 3ao = tex2Dlod(ssaoTex, float4(IN.texCoord, 0, 0));397 398 if (ao.y < 10.0f) ao.x = Filter(IN.texCoord, ssaoTex, filterOffs, filterWeights);399 400 OUT.illum_col = col * ao.x;401 //OUT.illum_col = float4(ao.x, ao.x, ao.x, col.w);395 float4 ao = tex2Dlod(ssaoTex, float4(IN.texCoord, 0, 0)); 396 397 //if (ao.y < 10.0f) ao.x = Filter(IN.texCoord, ssaoTex, filterOffs, filterWeights); 398 399 //OUT.illum_col = col * ao.x; 400 OUT.illum_col = float4(ao.y, ao.y, ao.y, col.w); 402 401 //OUT.illum_col.xyz = float3(1.0f - ao.x, 1.0f - ao.y * 1e-2f, 1); 403 402 //OUT.illum_col.xyz = float3(1.0f - ao.x, ao.y, 0);
Note: See TracChangeset
for help on using the changeset viewer.