Changeset 3342 for GTP


Ignore:
Timestamp:
04/13/09 08:44:22 (15 years ago)
Author:
mattausch
Message:

found error

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

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/Converter.vcproj

    r3334 r3342  
    156156                                AdditionalLibraryDirectories="libs\Zlib\lib" 
    157157                                IgnoreDefaultLibraryNames="libCMT" 
    158                                 GenerateDebugInformation="true" 
     158                                GenerateDebugInformation="false" 
    159159                                SubSystem="1" 
    160160                                LargeAddressAware="2" 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/Converter/ObjConverter.cpp

    r3335 r3342  
    523523        vector<Geometry *>::const_iterator it, it_end = mGeometry.end(); 
    524524 
    525         Material defaultMaterial; 
    526  
    527525        for (it = mGeometry.begin(); it != it_end; ++ it) 
    528526        { 
    529  
    530                 /////////////////////// 
    531                 //-- write geometry 
    532  
    533527                WriteGeometry(ofile, *it); 
    534528 
    535529                 
    536530                ///////// 
    537                 //-- write material 
    538  
    539                 Material *mat = (*it)->mMaterial ? (*it)->mMaterial : &defaultMaterial; 
     531                //-- material 
     532 
     533                Material *mat = (*it)->mMaterial; 
     534 
     535                if (!mat) cerr << "error: no material specified!!" << endl; 
    540536 
    541537                ofile.write(reinterpret_cast<char *>(&mat->texture), sizeof(int)); 
     
    544540                //bool cullFaceEnabled = false; 
    545541                bool cullFaceEnabled = true; 
    546  
     542                 
    547543                ofile.write(reinterpret_cast<char *>(&alphaTestEnabled), sizeof(bool)); 
    548544                ofile.write(reinterpret_cast<char *>(&cullFaceEnabled), sizeof(bool)); 
     
    551547                bool hasMaterial = true; 
    552548                ofile.write(reinterpret_cast<char *>(&hasMaterial), sizeof(bool)); 
    553  
     549         
    554550                SimpleVec ambient, diffuse, spec, emm; 
    555551 
    556552                ambient.x = ambient.y = ambient.z = 0.2f; 
    557553                //diffuse.x = diffuse.y = diffuse.z = 1.0f; 
    558                 diffuse.x = mat->rgb[0]; diffuse.y = mat->rgb[1]; diffuse.z = mat->rgb[2]; 
     554                diffuse.x = mat->rgb[0]; diffuse.y =mat->rgb[1]; diffuse.z = mat->rgb[2]; 
    559555                spec.x = spec.y = spec.z = .0f; 
    560556                emm = spec; 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/Converter/ObjConverter2.cpp

    r3335 r3342  
    486486                Material *mat = (*it)->mMaterial; 
    487487 
    488                 if (!mat) cerr << "error: no material associated with this geometry!!" << endl; 
     488                if (!mat) cerr << "error: no material specified!!" << endl; 
    489489 
    490490                ofile.write(reinterpret_cast<char *>(&mat->texture), sizeof(int)); 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/Converter/main.cpp

    r3334 r3342  
    1414 
    1515        cout << "converting obj to dem format" << endl; 
    16 #if 1 // use this path for converting a file with materials 
    17         if  (argc > 3) 
     16#if 1 
     17        if (!converter.LoadMaterials(model_path + argv[3])) 
    1818        { 
    19                 if (!converter.LoadMaterials(model_path + argv[3])) 
    20                 { 
    21                         cerr << "loading materials failed" << endl; 
     19                cerr << "loading materials failed" << endl; 
    2220 
    23                         std::cin.get(); 
    24                         exit(0); 
    25                 } 
     21                std::cin.get(); 
     22                exit(0); 
    2623        } 
    2724 
     
    3330                exit(0); 
    3431        } 
    35 #else // use this bath to convert the pompeii model 
     32#else 
    3633         
    3734        //const int numFiles = 879; 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/MainApp.vcproj

    r3338 r3342  
    156156                                IgnoreAllDefaultLibraries="false" 
    157157                                IgnoreDefaultLibraryNames="LIBCMT" 
    158                                 GenerateDebugInformation="true" 
     158                                GenerateDebugInformation="false" 
    159159                                SubSystem="1" 
    160160                                LargeAddressAware="2" 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/sibenik.env

    r3323 r3342  
    101101ssaoUseFullResolution=1 
    102102# ssao kernel radius 
    103 ssaoKernelRadius=2.5f 
     103ssaoKernelRadius=1.0f 
    104104# ssao sample intensity 
    105 #ssaoSampleIntensity=0.2f 
    106 ssaoSampleIntensity=0.8f 
     105ssaoSampleIntensity=0.9f 
     106#ssaoSampleIntensity=0.8f 
    107107# ssao temporal coherence factor 
    108108tempCohFactor=1500.0f 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp

    r3341 r3342  
    284284static void UpdateSampleTex(Sample2 *samples, int numSamples) 
    285285{ 
    286         PrintGLerror("here4"); 
    287286        glEnable(GL_TEXTURE_2D); 
    288287        glBindTexture(GL_TEXTURE_2D, sampleTex2D); 
     
    418417        for (int i = 0; i < 4; ++ i) 
    419418        { 
    420                 mIllumFbo->AddColorBuffer(ColorBufferObject::R_FLOAT_32, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_LINEAR); 
     419                mIllumFbo->AddColorBuffer(ColorBufferObject::RGBA_FLOAT_32, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_LINEAR); 
    421420                FrameBufferObject::InitBuffer(mIllumFbo, i); 
    422421        } 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao.cg

    r3341 r3342  
    496496         
    497497        //const float radiusMult = kernelRadius; 
    498         const float radiusMult = 3e-2; 
    499         //const float radiusMult = kernelRadius * invw; 
    500          
    501 #if 1 
    502 //#ifdef PERFORMANCE_TEST        
     498        //const float radiusMult = 3e-2; 
     499        const float radiusMult = kernelRadius * invw; 
     500         
     501#ifdef PERFORMANCE_TEST  
    503502 
    504503        float3 diffVec = tex2Dlod(attribsTex, float4(IN.texCoord, 0, 0)).xyz; 
     
    558557        } 
    559558 
    560 #if 1 
    561 //#ifdef PERFORMANCE_TEST 
     559 
     560#ifdef PERFORMANCE_TEST 
    562561 
    563562        /////////// 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/toto.txt

    r3340 r3342  
    210210 
    211211fix normals!! 
    212  
    213  
    214 test against old version 
    215 index + Q in same channel 
    216  
    217 make ambient first then ao then diffuse!! 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/vienna.env

    r3306 r3342  
    110110ssaoKernelRadius=4e-1f 
    111111# ssao sample intensity 
    112 #ssaoSampleIntensity=0.2f 
    113 ssaoSampleIntensity=0.8f 
     112ssaoSampleIntensity=0.2f 
     113#ssaoSampleIntensity=0.8f 
    114114# ssao temporal coherence factor 
    115115tempCohFactor=2000.0f 
Note: See TracChangeset for help on using the changeset viewer.