- Timestamp:
- 11/25/08 02:37:23 (16 years ago)
- Location:
- GTP/trunk/App/Demos/Vis/FriendlyCulling
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/Converter/ObjConverter.cpp
r3146 r3161 172 172 for (int i = 0; i < numElements; ++ i) 173 173 { 174 #if 1174 #if 0 175 175 // convert to our camera system: change y and z 176 176 geom->mVertices[i].x = faceVertices[i].x; … … 279 279 default: 280 280 sscanf(str + 1, "%f %f %f", &x, &y, &z); 281 const float scale = 5e-3f; 281 //const float scale = 5e-3f; 282 const float scale = 1.0f; 282 283 vertices.push_back(SimpleVec(x * scale, y * scale, z* scale)); 283 284 //cout <<"v " << x << " " << y << " "<< z << " "; … … 390 391 391 392 ambient.x = ambient.y = ambient.z = 0.2f; 392 diffuse.x = diffuse.y = diffuse.z = 1.0f; 393 //diffuse.x = diffuse.y = diffuse.z = 1.0f; 394 diffuse.x = 0.7f; diffuse.y = 0.5f; diffuse.z = 0.2f; 393 395 spec.x = spec.y = spec.z = .0f; 394 396 emm = spec; -
GTP/trunk/App/Demos/Vis/FriendlyCulling/VboFormatConverter/VboFormatConverter.cpp
r3155 r3161 118 118 geom->mTexcoords[line].second = 1.0f - tex.second; 119 119 120 static int dummy = 0;121 if (dummy ++ < 5) cout << "tangent: " << geom->mTangents[line] << endl;122 120 ++ line; 123 121 } -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp
r3160 r3161 456 456 const float filterWidth = 100.0f; 457 457 //const float filterWidth = 200.0f; 458 //const float filterWidth = 50.0f; 458 459 459 460 PoissonDiscSampleGenerator2 poisson(NUM_SSAO_FILTERSAMPLES, 1.0f); -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaderenv.h
r3160 r3161 6 6 //-- ssao + gi parameters 7 7 8 #define NUM_SAMPLES 89 8 //#define NUM_SAMPLES 8 9 #define NUM_SAMPLES 48 10 10 11 11 // for quadratic falloff 12 12 //#define SAMPLE_INTENSITY 0.2f 13 13 #define SAMPLE_INTENSITY 0.07f 14 //#define SAMPLE_INTENSITY 0.005f 14 15 15 16 //#define SAMPLE_INTENSITY 0.075f … … 60 61 61 62 //#define NUM_SSAO_FILTERSAMPLES 25 62 #define NUM_SSAO_FILTERSAMPLES 1663 //#define NUM_SSAO_FILTERSAMPLES 8 163 #define NUM_SSAO_FILTERSAMPLES 8 64 //#define NUM_SSAO_FILTERSAMPLES 80 64 65 65 66 -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/combineSsao.cg
r3160 r3161 100 100 101 101 // reconstruct position from the eye space depth 102 const float eyeSpaceDepth = col.w; 103 const float4 worldPos = float4(-IN.view * eyeSpaceDepth, 1.0f); 102 /*const float4 worldPos = float4(-IN.view * eyeSpaceDepth, 1.0f); 104 103 // compute w factor from projection in order to control filter size 105 104 const float4 projPos = mul(modelViewProj, worldPos); 106 105 const float distanceScale = 1.0f / projPos.w; 106 */ 107 108 const float eyeSpaceDepth = col.w; 109 110 const float scaleFactor = 2.0f; 111 const float distanceScale = scaleFactor / (eyeSpaceDepth + scaleFactor); 107 112 108 113 const float convergence = ao.y; 114 115 const float adaptFactor = 5.0f; 116 const float convergenceScale = adaptFactor / (convergence + adaptFactor); 117 109 118 110 119 if ((ao.y < 100.0f) && (col.w < 1e10f)) 111 120 //if (col.w < 1e10f) 112 121 { 113 const float scaleFactor = 1.0f; 114 const float adaptFactor = 5.0f; 115 const float scale = adaptFactor * scaleFactor * distanceScale / (adaptFactor + convergence); 116 117 ao.x = DiscontinuityFilter(IN.texCoord, ao, col, ssaoTex, normalsTex, colorsTex, filterOffs, filterWeights, scale); 122 ao.x = DiscontinuityFilter(IN.texCoord, ao, col, ssaoTex, normalsTex, colorsTex, filterOffs, filterWeights, convergenceScale * distanceScale); 118 123 } 119 124 -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao.cg
r3159 r3161 153 153 { 154 154 newWeight = 4.0f; 155 //newWeight = 1.0f; 155 156 } 156 //if (pixelValid > 1.0f) newWeight = max(15.0f - notValid * 2.0f, 1.0f);157 157 } 158 158 else
Note: See TracChangeset
for help on using the changeset viewer.