- Timestamp:
- 08/29/08 20:33:21 (16 years ago)
- Location:
- GTP/trunk/App/Demos/Vis/FriendlyCulling
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/FriendlyCulling.vcproj
r2884 r2886 292 292 </File> 293 293 <File 294 RelativePath=".\src\RndGauss.h" 295 > 296 </File> 297 <File 294 298 RelativePath=".\src\SampleGenerator.cpp" 295 299 > -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SampleGenerator.h
r2853 r2886 8 8 struct Sample2 9 9 { 10 Sample2() {} 11 Sample2(float _x, float _y): x(_x), y(_y) {} 12 10 13 float x; 11 14 float y; … … 33 36 { 34 37 public: 38 35 39 PoissonDiscSampleGenerator(int numSamples, float radius); 36 40 -
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 -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SsaoShader.h
r2880 r2886 83 83 84 84 } // namespace 85 85 86 #endif // _SsaoShader_H__ -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao.cg
r2885 r2886 28 28 // reflect around plane 29 29 float2 rpt = pt - d * 2.0f * n; 30 30 31 return rpt; 31 32 } … … 178 179 179 180 OUT.illum_col = col * ao.x; 181 //OUT.illum_col = ao; 180 182 OUT.illum_col.w = ao.w; 181 183
Note: See TracChangeset
for help on using the changeset viewer.