Changeset 3161 for GTP/trunk


Ignore:
Timestamp:
11/25/08 02:37:23 (16 years ago)
Author:
mattausch
Message:

not working ....

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  
    172172        for (int i = 0; i < numElements; ++ i) 
    173173        { 
    174 #if 1 
     174#if 0 
    175175                // convert to our camera system: change y and z 
    176176                geom->mVertices[i].x = faceVertices[i].x; 
     
    279279                                default: 
    280280                                        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; 
    282283                                        vertices.push_back(SimpleVec(x * scale, y * scale, z* scale)); 
    283284                                        //cout <<"v " << x << " " << y << " "<< z << " "; 
     
    390391 
    391392                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; 
    393395                spec.x    = spec.y    = spec.z    =  .0f; 
    394396                emm = spec; 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/VboFormatConverter/VboFormatConverter.cpp

    r3155 r3161  
    118118                geom->mTexcoords[line].second = 1.0f - tex.second; 
    119119 
    120                 static int dummy = 0; 
    121                 if (dummy ++ < 5) cout << "tangent: " << geom->mTangents[line] << endl; 
    122120                ++ line; 
    123121        } 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp

    r3160 r3161  
    456456        const float filterWidth = 100.0f; 
    457457        //const float filterWidth = 200.0f; 
     458        //const float filterWidth = 50.0f; 
    458459 
    459460        PoissonDiscSampleGenerator2 poisson(NUM_SSAO_FILTERSAMPLES, 1.0f); 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaderenv.h

    r3160 r3161  
    66//-- ssao + gi parameters 
    77 
    8 #define NUM_SAMPLES 8 
    98//#define NUM_SAMPLES 8 
     9#define NUM_SAMPLES 48 
    1010 
    1111// for quadratic falloff 
    1212//#define SAMPLE_INTENSITY 0.2f 
    1313#define SAMPLE_INTENSITY 0.07f 
     14//#define SAMPLE_INTENSITY 0.005f 
    1415 
    1516//#define SAMPLE_INTENSITY 0.075f 
     
    6061 
    6162//#define NUM_SSAO_FILTERSAMPLES 25 
    62 #define NUM_SSAO_FILTERSAMPLES 16 
    63 //#define NUM_SSAO_FILTERSAMPLES 81 
     63#define NUM_SSAO_FILTERSAMPLES 8 
     64//#define NUM_SSAO_FILTERSAMPLES 80 
    6465 
    6566 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/combineSsao.cg

    r3160 r3161  
    100100 
    101101        // 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); 
    104103        // compute w factor from projection in order to control filter size 
    105104        const float4 projPos = mul(modelViewProj, worldPos); 
    106105        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); 
    107112 
    108113        const float convergence = ao.y; 
     114 
     115        const float adaptFactor = 5.0f; 
     116        const float convergenceScale = adaptFactor / (convergence + adaptFactor); 
     117 
    109118 
    110119        if ((ao.y < 100.0f) && (col.w < 1e10f)) 
    111120        //if (col.w < 1e10f) 
    112121        { 
    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); 
    118123        } 
    119124 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao.cg

    r3159 r3161  
    153153                {                
    154154                        newWeight = 4.0f; 
     155                        //newWeight = 1.0f; 
    155156                } 
    156                 //if (pixelValid > 1.0f) newWeight = max(15.0f - notValid * 2.0f, 1.0f); 
    157157        } 
    158158        else 
Note: See TracChangeset for help on using the changeset viewer.