- Timestamp:
- 08/29/08 20:33:21 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SsaoShader.cpp
r2884 r2886 6 6 #include "Camera.h" 7 7 #include "shaderenv.h" 8 #include "RndGauss.h" 9 #include "Halton.h" 8 10 9 11 … … 11 13 12 14 static GLenum mymrt[] = {GL_COLOR_ATTACHMENT0_EXT, GL_COLOR_ATTACHMENT1_EXT, GL_COLOR_ATTACHMENT2_EXT, GL_COLOR_ATTACHMENT3_EXT}; 15 13 16 14 17 namespace CHCDemoEngine … … 103 106 static void GenerateSamples() 104 107 { 108 #if 0 105 109 static PoissonDiscSampleGenerator poisson(NUM_SAMPLES, 1.0f); 106 110 poisson.Generate((Sample2 *)samples); 111 #else 112 113 const float radius = 1.0f; 114 const float sigma = ComputeSigmaFromRadius(1.0f); 115 116 static HaltonSequence halton; 117 118 for (int i = 0; i < NUM_SAMPLES; ++ i) 119 { 120 Sample2 s; 121 Vector3 input; 122 123 halton.GetNext(3, (float *)&input.x); 124 125 PolarGaussianOnDisk(input, // input (RND in interval [0-1)x[0-1)) 126 sigma, // standard deviation of gaussian distribution 127 radius, // standard deviation of gaussian distribution 128 s); // result 129 samples[i] = s; 130 } 131 #endif 107 132 } 108 133
Note: See TracChangeset
for help on using the changeset viewer.