- Timestamp:
- 12/07/08 23:26:00 (16 years ago)
- Location:
- GTP/trunk/App/Demos/Vis/FriendlyCulling
- Files:
-
- 1 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/FriendlyCulling.sln
r3207 r3212 14 14 EndProject 15 15 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IrradianceMapping", "IrradianceMapping.vcproj", "{91680C49-A358-48AE-A02C-66CB884B7D7F}" 16 ProjectSection(ProjectDependencies) = postProject 17 {03661866-4093-4B02-B26A-028EA91AF023} = {03661866-4093-4B02-B26A-028EA91AF023} 18 EndProjectSection 16 19 EndProject 17 20 Global -
GTP/trunk/App/Demos/Vis/FriendlyCulling/FriendlyCulling.vcproj
r3202 r3212 772 772 </File> 773 773 <File 774 RelativePath=".\src\shaders\lenseFlare.cg" 775 > 776 </File> 777 <File 774 778 RelativePath=".\src\shaders\mrt.cg" 775 779 > -
GTP/trunk/App/Demos/Vis/FriendlyCulling/default.env
r3202 r3212 57 57 # window options 58 58 59 //winWidth=800 60 //winHeight=600 61 59 62 winWidth=1024 60 63 winHeight=768 … … 89 92 //camPosition=465.626 248.788 184.978 90 93 //camDirection=0.0592959 0.998021 0.0209425 94 95 ssaoKernelRadius=8e-1f 96 97 ssaoSampleIntensity=0.2f -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp
r3206 r3212 76 76 static float ssaoFilterWeights[NUM_SSAO_FILTER_SAMPLES]; 77 77 78 static GLuint sBurstTex; 79 static GLuint sHaloTex[4]; 78 80 79 81 int DeferredRenderer::colorBufferIdx = 0; 82 83 84 static void PrepareLenseFlare() 85 { 86 sBurstTex = new Texture("burst.jpg"); 87 88 Texture(const std::string &filename); 89 90 glEnable(GL_TEXTURE_2D); 91 glGenTextures(1, &sBurstTex); 92 glBindTexture(GL_TEXTURE_2D, sBurstTex); 93 94 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); 95 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); 96 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); 97 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); 98 99 glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, randomNormals); 100 101 glBindTexture(GL_TEXTURE_2D, 0); 102 glDisable(GL_TEXTURE_2D); 103 104 delete [] randomNormals; 105 106 cout << "prepared lense flare textures" << endl; 107 108 PrintGLerror("prepare lense flare"); 109 } 80 110 81 111 … … 300 330 mShadingMethod(DEFAULT), 301 331 mIllumFboIndex(0), 302 mSortSamples(true) 332 mSortSamples(true), 333 mKernelRadius(1e-8f), 334 mSampleIntensity(0.2f) 303 335 { 304 336 /////////// 305 337 //-- the flip-flop fbos 306 338 307 const int dsw = w / 2; const int dsh = h / 2;308 //const int dsw = w; const int dsh = h;339 //const int dsw = w / 2; const int dsh = h / 2; 340 const int dsw = w; const int dsh = h; 309 341 310 342 mIllumFbo = new FrameBufferObject(dsw, dsh, FrameBufferObject::DEPTH_NONE); … … 321 353 322 354 /////////////// 323 //-- the downsampled ssao + color bleeding textures: as GI is mostly low frequency, we can use lower resolution toimprove performance 355 //-- the downsampled ssao + color bleeding textures: 356 //-- as GI is mostly low frequency, we can use lower resolution toimprove performance 324 357 325 358 mDownSampleFbo = new FrameBufferObject(dsw, dsh, FrameBufferObject::DEPTH_NONE); … … 327 360 mDownSampleFbo->AddColorBuffer(ColorBufferObject::RGBA_FLOAT_32, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_LINEAR); 328 361 // downsample buffer for the normal texture 329 mDownSampleFbo->AddColorBuffer(ColorBufferObject::RGB_FLOAT_16, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_NEAREST); 362 mDownSampleFbo->AddColorBuffer(ColorBufferObject::RGB_FLOAT_16, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_LINEAR); 363 330 364 331 365 for (int i = 0; i < 2; ++ i) … … 395 429 "samples", "bl", "br", "tl", "tr", 396 430 "modelViewProj", "oldModelViewProj", "oldEyePos", "oldbl", "oldbr", 397 "oldtl", "oldtr", "attribsTex" };398 sCgSsaoProgram->AddParameters(ssaoParams, 0, 18);431 "oldtl", "oldtr", "attribsTex", "kernelRadius", "sampleIntensity"}; 432 sCgSsaoProgram->AddParameters(ssaoParams, 0, 20); 399 433 400 434 string giParams[] = … … 702 736 703 737 for (int j = 0; j < 4; ++ j, ++ i) 738 { 704 739 sCgSsaoProgram->SetValue3f(i, mOldCornersView[j].x, mOldCornersView[j].y, mOldCornersView[j].z); 740 } 705 741 706 742 sCgSsaoProgram->SetTexture(i ++, attribsTex); 743 sCgSsaoProgram->SetValue1f(i ++, mKernelRadius); 744 sCgSsaoProgram->SetValue1f(i ++, mSampleIntensity); 707 745 708 746 … … 957 995 958 996 997 #if TODO 998 999 void DeferredRenderer::SetNumSamples(int numSamples) 1000 { 1001 mNumSamples = numSamples; 1002 } 1003 1004 #endif 1005 1006 1007 void DeferredRenderer::SetSampleIntensity(float sampleIntensity) 1008 { 1009 mSampleIntensity = sampleIntensity; 1010 } 1011 1012 1013 void DeferredRenderer::SetKernelRadius(float kernelRadius) 1014 { 1015 mKernelRadius = kernelRadius; 1016 } 1017 1018 959 1019 void DeferredRenderer::ComputeToneParameters(FrameBufferObject *fbo, 960 1020 DirectionalLight *light, … … 1058 1118 mDownSampleFbo->Bind(); 1059 1119 1060 // prepare downsampled colorand normal texture for ssao1120 // prepare downsampled depth and normal texture for ssao 1061 1121 glDrawBuffers(2, mrt); 1062 1122 … … 1066 1126 PrintGLerror("prepareSsao"); 1067 1127 } 1068 1069 1128 1070 1129 … … 1197 1256 } 1198 1257 1258 1259 void DeferredRenderer::LenseFlare(FrameBufferObject *fbo) 1260 { 1261 ColorBufferObject *colorBuffer = fbo->GetColorBuffer(colorBufferIdx); 1262 1263 FlipFbos(fbo); 1264 1265 sCgLenseFlareProgram->SetTexture(0, colorsTex); 1266 sCgLenseFlareProgram->SetTexture(1, sBurstTex); 1267 sCgLenseFlareProgram->SetTexture(2, sHaloTex[0]); 1268 sCgLenseFlareProgram->SetTexture(3, sHaloTex[1]); 1269 sCgLenseFlareProgram->SetValue1f(4, sHaloTex[2]); 1270 sCgLenseFlareProgram->SetValue1f(5, sHaloTex[3]); 1271 1272 DrawQuad(sCgLenseFlareProgram); 1273 1274 PrintGLerror("LenseFlare"); 1275 } 1276 1277 1199 1278 } // namespace -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.h
r3189 r3212 58 58 59 59 void SetSortSamples(bool sortSamples) { mSortSamples = sortSamples; } 60 61 void SetSampleIntensity(float sampleIntensity); 62 63 void SetKernelRadius(float kernelRadius); 64 60 65 61 66 // hack: store the color buffer idx for the currently used flip flop-MRT here … … 150 155 151 156 bool mSortSamples; 157 158 float mKernelRadius; 159 float mSampleIntensity; 152 160 }; 153 161 -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Texture.h
r3147 r3212 16 16 public: 17 17 18 // available texture formats 18 19 enum {FORMAT_INVALID, FORMAT_RGB, FORMAT_RGBA}; 19 20 // texture uv modes 20 21 enum {CLAMP, REPEAT}; 21 22 -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp
r3203 r3212 147 147 float turbitity = 5.0f; 148 148 149 // ssao parameters 150 float ssaoKernelRadius = 1e-8f; 151 float ssaoSampleIntensity = 0.2f; 152 float ssaoTempCohFactor = 255.0; 153 bool sortSamples = true; 154 149 155 int shadowSize = 2048; 156 150 157 /// the hud font 151 158 glfont::GLFont myfont; 152 159 153 160 // rendertexture 154 staticint texWidth = 1024;155 staticint texHeight = 768;161 int texWidth = 1024; 162 int texHeight = 768; 156 163 157 164 int renderedObjects = 0; … … 211 218 212 219 PerfTimer frameTimer, algTimer; 213 /// the performance window220 /// the performance graph window 214 221 PerformanceGraph *perfGraph = NULL; 215 222 216 float ssaoTempCohFactor = 255.0;217 bool sortSamples = true;218 223 int sCurrentMrtSet = 0; 219 224 … … 384 389 env.GetIntParam(string("renderMethod"), renderMethod); 385 390 391 env.GetFloatParam(string("ssaoKernelRadius"), ssaoKernelRadius); 392 env.GetFloatParam(string("ssaoSampleIntensity"), ssaoSampleIntensity); 393 386 394 //env.GetStringParam(string("modelPath"), model_path); 387 395 //env.GetIntParam(string("numSssaoSamples"), numSsaoSamples); 396 397 texWidth = winWidth; 398 texHeight = winHeight; 388 399 389 400 cout << "assumedVisibleFrames: " << assumedVisibleFrames << endl; … … 398 409 cout << "useLODs: " << useLODs << endl; 399 410 cout << "camPosition: " << camPos << endl; 400 cout << "temporal coherence: " << ssaoTempCohFactor << endl;401 411 cout << "shadow size: " << shadowSize << endl; 402 412 cout << "render method: " << renderMethod << endl; … … 404 414 cout << "use advanced shading: " << useAdvancedShading << endl; 405 415 cout << "turbitity: " << turbitity << endl; 416 cout << "temporal coherence: " << ssaoTempCohFactor << endl; 417 cout << "sample intensity: " << ssaoSampleIntensity << endl; 418 cout << "kernel radius: " << ssaoKernelRadius << endl; 406 419 407 420 //cout << "model path: " << model_path << endl; … … 1151 1164 deferredShader->SetShadingMethod(shadingMethod); 1152 1165 deferredShader->SetSamplingMethod(samplingMethod); 1166 deferredShader->SetKernelRadius(ssaoKernelRadius); 1167 deferredShader->SetSampleIntensity(ssaoSampleIntensity); 1153 1168 deferredShader->SetUseTemporalCoherence(useTemporalCoherence); 1154 1169 deferredShader->SetSortSamples(sortSamples); … … 1203 1218 { 1204 1219 case 27: 1220 // write out current position on exit 1205 1221 Debug << "camPosition=" << camera->GetPosition().x << " " << camera->GetPosition().y << " " << camera->GetPosition().z << endl; 1206 1222 Debug << "camDirection=" << camera->GetDirection().x << " " << camera->GetDirection().y << " " << camera->GetDirection().z << endl; … … 1247 1263 break; 1248 1264 case '3': 1249 if (trianglesPerVirtualLeaf >= 100) 1250 trianglesPerVirtualLeaf -= 100; 1265 if (trianglesPerVirtualLeaf >= 100) trianglesPerVirtualLeaf -= 100; 1251 1266 bvh->SetVirtualLeaves(trianglesPerVirtualLeaf); 1252 1267 break; … … 1269 1284 case '8': 1270 1285 ssaoTempCohFactor *= 2.0f; 1271 //if (ssaoTempCohFactor > 1.0f) ssaoExpFactor = 1.0f; 1286 break; 1287 case '9': 1288 ssaoKernelRadius *= 0.8f; 1289 break; 1290 case '0': 1291 ssaoKernelRadius *= 1.2f; 1292 break; 1293 case 'n': 1294 ssaoSampleIntensity *= 0.9f; 1295 break; 1296 case 'N': 1297 ssaoSampleIntensity *= 1.1f; 1272 1298 break; 1273 1299 case 'l': … … 1344 1370 useAntiAliasing = !useAntiAliasing; 1345 1371 break; 1346 case '9':1372 /*case '?': 1347 1373 sortSamples = !sortSamples; 1348 1374 break; 1375 */ 1349 1376 default: 1350 1377 return; … … 2003 2030 2004 2031 preetham->RenderSkyDome(-light->GetDirection(), camera, &renderState, !useToneMapping); 2005 /// once again reset the renderState 2032 2033 /// once again reset the renderState just to make sure 2006 2034 renderState.Reset(); 2007 2035 } -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaderenv.h
r3209 r3212 7 7 8 8 //#define NUM_SAMPLES 8 9 //#define NUM_SAMPLES 169 #define NUM_SAMPLES 16 10 10 //#define NUM_SAMPLES 24 11 #define NUM_SAMPLES 48 11 //#define NUM_SAMPLES 96 12 12 13 #define SAMPLE_INTENSITY 0.15f14 //#define SAMPLE_INTENSITY 2.0f15 16 #define SAMPLE_RADIUS 8e-1f17 //#define SAMPLE_RADIUS 15e-1f18 19 //#define DISTANCE_SCALE 1e-1f20 13 #define DISTANCE_SCALE 1e-2f 21 14 22 15 //#define ILLUM_INTENSITY 8e-2f 23 16 #define ILLUM_INTENSITY 5e-3f 24 17 /// scale factor that takes angle of sample normal into account 25 18 #define VIEW_CORRECTION_SCALE 1.0f 26 19 27 //#define NUM_SSAO_FILTERSAMPLES 8028 20 #define NUM_SSAO_FILTER_SAMPLES 16 29 21 -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/combineSsao.cg
r3209 r3212 125 125 126 126 aoSample = tex2Dlod(ssaoTex, sampleTexCoord); 127 //sampleNorm = tex2Dlod(normalsTex, sampleTexCoord).xyz; 128 127 129 128 // check spatial discontinuity 130 129 // note: using the depth from the color texture is not 100% correct as depth was … … 136 135 spatialFactor = 1.0f / max(len, 1e-3f); 137 136 137 convergenceFactor = aoSample.y + 1.0f; 138 139 //sampleNorm = tex2Dlod(normalsTex, sampleTexCoord).xyz; 138 140 //normalFactor = max(step(.2f, dot(sampleNorm, centerNormal)), 1e-2f); 139 convergenceFactor = aoSample.y + 1.0f; 140 141 141 142 // combine the weights 142 143 w = convergenceFactor * convergenceFactor * spatialFactor;// * normalFactor; … … 232 233 return OUT; 233 234 } 234 235 236 /** Function combining image and indirect illumination buffer using a237 depth and normal aware discontinuity filter.238 */239 pixel SmoothSsao(fragment IN,240 uniform sampler2D ssaoTex)241 {242 pixel OUT;243 244 float4 ao = tex2Dlod(ssaoTex, float4(IN.texCoord, 0, 0));245 246 float4 dummy;247 const float xoffs = .5f / 1024.0f; const float yoffs = .5f / 768.0f;248 249 // get positions exactly between old texel centers250 dummy.x = tex2Dlod(ssaoTex, float4(IN.texCoord + float2(xoffs, 0), 0, 0)).y;251 dummy.y = tex2Dlod(ssaoTex, float4(IN.texCoord + float2(0, -yoffs), 0, 0)).y;252 dummy.z = tex2Dlod(ssaoTex, float4(IN.texCoord + float2(-xoffs, 0), 0, 0)).y;253 dummy.w = tex2Dlod(ssaoTex, float4(IN.texCoord + float2(0, yoffs), 0, 0)).y;254 255 const float m1 = min(dummy.x, dummy.y);256 const float m2 = min(dummy.z, dummy.w);257 258 ao.y = min(ao.y, min(m1, m2));259 260 return OUT;261 } -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg
r3210 r3212 261 261 const bool oldDynamic = (squaredLen > DYNAMIC_OBJECTS_THRESHOLD); 262 262 const bool newDynamic = (oldPixel.z > DYNAMIC_OBJECTS_THRESHOLD); 263 264 //const float xOffs = 1.0f / 1024.0f; const float yOffs = 1.0f / 768.0f;265 //const float eps = 1e-6f;266 263 267 264 // actually 0 means pixel is valid … … 334 331 pix.color = color; 335 332 pix.color.xy = pValid.xy; 333 pix.color.z = color.w; 334 336 335 pix.normal = normal; 337 336 -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/globillum.cg
r3168 r3212 65 65 uniform float3 br, 66 66 uniform float3 tl, 67 uniform float3 tr 68 , uniform float3 viewDir 67 uniform float3 tr, 68 float3 viewDir, 69 float sampleIntensity 69 70 ) 70 71 { … … 125 126 const float denom = (DISTANCE_SCALE + magSample * magSample); 126 127 127 float2 intensity = float2( SAMPLE_INTENSITY, ILLUM_INTENSITY);128 float2 intensity = float2(sampleIntensity, ILLUM_INTENSITY); 128 129 intensity /= denom; 129 130 … … 161 162 uniform float3 br, 162 163 uniform float3 tl, 163 uniform float3 tr 164 uniform float3 tr, 165 uniform float kernelRadius, 166 uniform float sampleIntensity 164 167 ) 165 168 { 166 169 pixel2 OUT; 167 170 168 const float3 normal = tex2Dlod(normals, float4(IN.texCoord, 0 ,0)) ;171 const float3 normal = tex2Dlod(normals, float4(IN.texCoord, 0 ,0)).xyz; 169 172 170 173 … … 180 183 float4 currentPos = mul(modelViewProj, eyeSpacePos); 181 184 182 const float w = SAMPLE_RADIUS/ currentPos.w;185 const float w = kernelRadius / currentPos.w; 183 186 currentPos /= currentPos.w; 184 187 … … 188 191 //-- compute color bleeding + ao 189 192 190 GiStruct gi = globIllum(IN, colors, noiseTex, samples, normal, eyeSpacePos, w, bl, br, tl, tr, normalize(IN.view) );193 GiStruct gi = globIllum(IN, colors, noiseTex, samples, normal, eyeSpacePos, w, bl, br, tl, tr, normalize(IN.view), sampleIntensity); 191 194 192 195 -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao.cg
r3209 r3212 108 108 const float ssao = oldPixel.x; 109 109 110 #if USE_EYESPACE_DEPTH111 112 110 // calculate eye space position of sample in old frame 113 111 const float oldEyeSpaceDepth = oldPixel.w; … … 120 118 121 119 const float depthDif = abs(1.0f - oldEyeSpaceDepth / projectedEyeSpaceDepth); 122 123 #else124 125 // calculate eye space position of sample in old frame126 const float oldDepth = oldPixel.w;127 // the depth projected into the old frame128 const float projectedDepth = projPos.z;129 // calculate depth difference130 const float depthDif = abs(projectedDepth - oldDepth);131 132 #endif133 120 134 121 const float xOffs = 1.0f / 1024.0f; … … 176 163 float3 tr, 177 164 float3 viewDir, 178 sampler2D normalTex 165 sampler2D normalTex, 166 float sampleIntensity 179 167 ) 180 168 { … … 224 212 cosAngle *= step(0.0f, dot(dirSample, normal)); 225 213 226 const float aoContrib = SAMPLE_INTENSITY/ sqrLen;214 const float aoContrib = sampleIntensity / sqrLen; 227 215 //const float aoContrib = (1.0f > lengthToSample) ? occlusionPower(9e-2f, DISTANCE_SCALE + lengthToSample): .0f; 228 216 … … 270 258 float3 viewDir, 271 259 float newWeight, 272 bool isMovingObject260 float sampleIntensity 273 261 ) 274 262 { … … 310 298 // angle between current normal and direction to sample controls AO intensity. 311 299 const float cosAngle = max(dot(dirSample, normal), .0f); 312 const float aoContrib = SAMPLE_INTENSITY/ sqrLen;300 const float aoContrib = sampleIntensity / sqrLen; 313 301 //const float aoContrib = (1.0f > lengthToSample) ? occlusionPower(9e-2f, DISTANCE_SCALE + lengthToSample): .0f; 314 302 … … 338 326 339 327 //if ((validSamples < 1.0f) && (newWeight > 200) && (numSamples >= 8)) break; 340 if ((validSamples < 1.0f) && (numSamples >= 8) && !isMovingObject 341 || (newWeight > NUM_SAMPLES * 5) && (numSamples >= 8) && isMovingObject 342 ) 343 { 344 break; 345 } 328 //if ((validSamples < 1.0f) && (numSamples >= 8)) break; 346 329 } 347 330 348 331 total_ao /= numSamples; 349 332 350 //return float3(max(0.0f, 1.0f - total_ao), validSamples, numSamples); 351 return float3(total_ao, validSamples, numSamples); 333 return float3(max(0.0f, 1.0f - total_ao), validSamples, numSamples); 352 334 } 353 335 … … 374 356 uniform float3 oldtl, 375 357 uniform float3 oldtr, 376 uniform sampler2D attribsTex 358 uniform sampler2D attribsTex, 359 uniform float kernelRadius, 360 uniform float sampleIntensity 377 361 ) 378 362 { … … 396 380 const float invw = 1.0f / projPos.w; 397 381 projPos *= invw; 398 float scaleFactor = SAMPLE_RADIUS * invw; 399 400 const float sqrMoveSpeed = SqrLen(diffVec); 401 const bool isMovingObject = (sqrMoveSpeed > DYNAMIC_OBJECTS_THRESHOLD); 382 float scaleFactor = kernelRadius * invw; 402 383 403 384 … … 422 403 if (eyeSpaceDepth < 1e10f) 423 404 { 424 ao = ssao(IN, colors, noiseTex, samples, normal, eyeSpacePos.xyz, scaleFactor, bl, br, tl, tr, normalize(viewDir), oldWeight, isMovingObject);425 //ao = ssao2(IN, colors, noiseTex, samples, normal, eyeSpacePos.xyz, scaleFactor, bl, br, tl, tr, normalize(viewDir), normals );405 ao = ssao(IN, colors, noiseTex, samples, normal, eyeSpacePos.xyz, scaleFactor, bl, br, tl, tr, normalize(viewDir), oldWeight, sampleIntensity); 406 //ao = ssao2(IN, colors, noiseTex, samples, normal, eyeSpacePos.xyz, scaleFactor, bl, br, tl, tr, normalize(viewDir), normals, sampleIntensity); 426 407 } 427 408 else … … 430 411 } 431 412 432 // equals the number of sampled shot in this pass 433 const float newWeight = ao.z; 413 const float squaredLen = SqrLen(diffVec); 434 414 435 415 // check if we have to reset pixel because one of the sample points was invalid 436 if (!isMovingObject) 437 //if (sqrMoveSpeed <= DYNAMIC_OBJECTS_THRESHOLD) 416 if (squaredLen < DYNAMIC_OBJECTS_THRESHOLD) 438 417 { 439 418 if (ao.y > 4.0f) 440 419 oldWeight = 0; 441 420 else if (ao.y > 1.0f) 442 oldWeight = min(oldWeight, 4.0f * newWeight); 443 } 444 421 oldWeight = min(oldWeight, 4.0f * NUM_SAMPLES); 422 } 423 424 const float newWeight = ao.z; 445 425 const float combinedWeight = clamp(newWeight + oldWeight, .0f, temporalCoherence); 446 426 -
GTP/trunk/App/Demos/Vis/FriendlyCulling/toto.txt
r3203 r3212 45 45 46 46 3) normal mapping 47 48 working but already done! 47 49 48 50 … … 120 122 q: is it good to choose new weight as we do? (approx 4 frames) 121 123 or shouldn't we just completely reset sample? 124 125 126 127 shading todo: 128 129 bloom 130 dof 131 lense flar 132 god rays 133 sun disc 134 environment lighting
Note: See TracChangeset
for help on using the changeset viewer.