Changeset 3343
- Timestamp:
- 04/13/09 12:01:13 (16 years ago)
- Location:
- GTP/trunk/App/Demos/Vis/FriendlyCulling
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/sibenik.env
r3342 r3343 101 101 ssaoUseFullResolution=1 102 102 # ssao kernel radius 103 ssaoKernelRadius= 1.0f103 ssaoKernelRadius=0.5f 104 104 # ssao sample intensity 105 ssaoSampleIntensity= 0.9f105 ssaoSampleIntensity=2.0f 106 106 #ssaoSampleIntensity=0.8f 107 107 # ssao temporal coherence factor -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp
r3342 r3343 234 234 default: // SAMPLING_DEFAULT 235 235 { 236 RandomSampleGenerator2D g(NUM_ SAMPLES, 1.0f);236 RandomSampleGenerator2D g(NUM_PRECOMPUTED_SAMPLES, 1.0f); 237 237 g.Generate((float *)samples2); 238 238 } … … 845 845 { 846 846 CreateSampleTex(samples2, NUM_PRECOMPUTED_SAMPLES); 847 cout<<"here34"<<endl;848 847 } 849 848 else -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SampleGenerator.cpp
r3339 r3343 41 41 // the maximal possible radius: our radius is a fraction of this radius 42 42 // this is used as a measure of the quality of distribution of the point samples 43 const float rmax = 2.0f * mRadius * sqrt(1.0f / (2.0f * sqrt(3.0f) * mNumSamples)); 43 //const float rmax = 2.0f * mRadius * sqrt(1.0f / (2.0f * sqrt(3.0f) * mNumSamples)); 44 float rmax = 0.5f; //mRadius * sqrt(1.0f / (2.0f * sqrt(3.0f) * mNumSamples)); 44 45 45 46 // generates poisson distribution on disc 46 47 // start with some thresholds: all samples lie on the circumference of circle 47 48 48 float minDist = 2.0f * rmax; 49 //float minDist = 2.0f * rmax; 50 float minDist = rmax; 49 51 float sqrMinDist = minDist * minDist; 50 52 51 53 int tries = 0; 52 54 53 cout << "minDist before= " << minDist << endl; 55 //cout << "minDist before= " << minDist / rmax << endl; 56 cout << "minDist before= " << rmax << endl; 57 54 58 Sample2 *s = (Sample2 *)samples; 55 59 … … 124 128 } 125 129 126 cout << "minDist after= " << (float)minDist / mNumSamples<< " #tries: " << tries << endl; 130 rmax = mRadius * sqrt(1.0f / (2.0f * sqrt(3.0f) * mNumSamples)); 131 cout << "minDist after= " << (float)minDist * mNumSamples << " #tries: " << tries << " samples: " << mNumSamples << endl; 132 cout << "minDist after= " << (float)minDist / rmax << " #tries: " << tries << endl; 127 133 } 128 134 … … 225 231 226 232 227 QuadraticDiscSampleGenerator2D::QuadraticDiscSampleGenerator2D(int numSamples, float radius): 233 QuadraticDiscSampleGenerator2D::QuadraticDiscSampleGenerator2D(int numSamples, 234 float radius): 228 235 //PoissonDiscSampleGenerator2D(numSamples, radius) 229 236 RandomSampleGenerator2D(numSamples, radius) 230 {} 237 { 238 } 231 239 232 240 … … 237 245 int numSamples = 0; 238 246 float x[2]; 239 240 static float total1 = 0;241 static float total2 = 0;242 static int totalSamples = 0;243 247 244 248 for (int i = 0; i < mNumSamples; ++ i) -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SampleGenerator.h
r3313 r3343 29 29 30 30 /** Class generating random samples on a disc or in a sphere, respectively. 31 Note: Rewrite this!! it does not work well enough, rather, sample generator should 32 be either poisson or halton or random that can be used to create samples on a disc ... 31 33 */ 32 34 class SampleGenerator -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaderenv.h
r3340 r3343 8 8 #define NUM_PRECOMPUTED_SAMPLES 4096 9 9 10 #define NUM_SAMPLES 810 //#define NUM_SAMPLES 8 11 11 //#define NUM_SAMPLES 16 12 12 //#define NUM_SAMPLES 24 13 //#define NUM_SAMPLES 24 13 #define NUM_SAMPLES 48 14 14 15 15 //#define MIN_SAMPLES 48 -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/combineSsaoSep.cg
r3341 r3343 249 249 } 250 250 251 OUT.illum_col.xyz = float3(ao.w * 5e-1f, 0, 0);251 //OUT.illum_col.xyz = float3(ao.w * 5e-1f, 0, 0); 252 252 //OUT.illum_col.xyz = float3(ao.z * 1e-1f); 253 OUT.illum_col.xyz = float3(ao.y * 1e-1f);//, 0, 0);253 //OUT.illum_col.xyz = float3(ao.y * 1e-1f);//, 0, 0); 254 254 //OUT.illum_col.xyz = ao.xyz; 255 255 -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao.cg
r3342 r3343 522 522 523 523 float oldWeight = temporalVals.y; 524 float oldIdx = /*temporalCoherence > 1 ? */temporalVals.z/* : 0*/;524 float oldIdx = temporalCoherence > 1 ? temporalVals.z : 0; 525 525 526 526 #else
Note: See TracChangeset
for help on using the changeset viewer.