Changeset 3343 for GTP


Ignore:
Timestamp:
04/13/09 12:01:13 (15 years ago)
Author:
mattausch
Message:

working really nicely

Location:
GTP/trunk/App/Demos/Vis/FriendlyCulling
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/sibenik.env

    r3342 r3343  
    101101ssaoUseFullResolution=1 
    102102# ssao kernel radius 
    103 ssaoKernelRadius=1.0f 
     103ssaoKernelRadius=0.5f 
    104104# ssao sample intensity 
    105 ssaoSampleIntensity=0.9f 
     105ssaoSampleIntensity=2.0f 
    106106#ssaoSampleIntensity=0.8f 
    107107# ssao temporal coherence factor 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp

    r3342 r3343  
    234234        default: // SAMPLING_DEFAULT 
    235235                { 
    236                         RandomSampleGenerator2D g(NUM_SAMPLES, 1.0f); 
     236                        RandomSampleGenerator2D g(NUM_PRECOMPUTED_SAMPLES, 1.0f); 
    237237                        g.Generate((float *)samples2); 
    238238                } 
     
    845845                { 
    846846                        CreateSampleTex(samples2, NUM_PRECOMPUTED_SAMPLES); 
    847                         cout<<"here34"<<endl; 
    848847                } 
    849848                else 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SampleGenerator.cpp

    r3339 r3343  
    4141        // the maximal possible radius: our radius is a fraction of this radius 
    4242        // 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)); 
    4445 
    4546        // generates poisson distribution on disc 
    4647        // start with some thresholds: all samples lie on the circumference of circle 
    4748          
    48         float minDist = 2.0f * rmax; 
     49        //float minDist = 2.0f * rmax; 
     50        float minDist = rmax; 
    4951        float sqrMinDist = minDist * minDist; 
    5052 
    5153        int tries = 0; 
    5254 
    53         cout << "minDist before= " << minDist << endl; 
     55        //cout << "minDist before= " << minDist / rmax << endl; 
     56        cout << "minDist before= " << rmax << endl; 
     57 
    5458        Sample2 *s = (Sample2 *)samples; 
    5559 
     
    124128        } 
    125129 
    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; 
    127133} 
    128134 
     
    225231 
    226232 
    227 QuadraticDiscSampleGenerator2D::QuadraticDiscSampleGenerator2D(int numSamples, float radius): 
     233QuadraticDiscSampleGenerator2D::QuadraticDiscSampleGenerator2D(int numSamples,  
     234                                                                                                                           float radius): 
    228235//PoissonDiscSampleGenerator2D(numSamples, radius) 
    229236RandomSampleGenerator2D(numSamples, radius) 
    230 {} 
     237{ 
     238} 
    231239 
    232240 
     
    237245        int numSamples = 0; 
    238246        float x[2]; 
    239  
    240         static float total1 = 0; 
    241         static float total2 = 0; 
    242         static int totalSamples = 0; 
    243247 
    244248        for (int i = 0; i < mNumSamples; ++ i) 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SampleGenerator.h

    r3313 r3343  
    2929 
    3030/** 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 ... 
    3133*/ 
    3234class SampleGenerator 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaderenv.h

    r3340 r3343  
    88#define NUM_PRECOMPUTED_SAMPLES 4096 
    99 
    10 #define NUM_SAMPLES 8 
     10//#define NUM_SAMPLES 8 
    1111//#define NUM_SAMPLES 16 
    1212//#define NUM_SAMPLES 24 
    13 //#define NUM_SAMPLES 24 
     13#define NUM_SAMPLES 48 
    1414 
    1515//#define MIN_SAMPLES 48 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/combineSsaoSep.cg

    r3341 r3343  
    249249        } 
    250250 
    251         OUT.illum_col.xyz = float3(ao.w * 5e-1f, 0, 0); 
     251        //OUT.illum_col.xyz = float3(ao.w * 5e-1f, 0, 0); 
    252252        //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); 
    254254        //OUT.illum_col.xyz = ao.xyz; 
    255255 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao.cg

    r3342 r3343  
    522522         
    523523        float oldWeight = temporalVals.y; 
    524         float oldIdx = /*temporalCoherence > 1 ? */temporalVals.z/* : 0*/; 
     524        float oldIdx = temporalCoherence > 1 ? temporalVals.z : 0; 
    525525         
    526526#else 
Note: See TracChangeset for help on using the changeset viewer.