Changeset 3152 for GTP


Ignore:
Timestamp:
11/21/08 09:19:15 (16 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/App/Demos/Vis/FriendlyCulling
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/VboFormatConverter/VboFormatConverter.cpp

    r3146 r3152  
    195195        { 
    196196                // hack 
    197                 const string texName("fischi_u1_v1.png"); 
     197                const string texName("FischiNormalmap.png"); 
    198198                //const string texName("wood.jpg"); 
    199199 
     
    203203                ofile.write(texName.c_str(), sizeof(char) * texnameSize); 
    204204 
    205                 int boundS = 1, boundT = 1; 
    206  
     205                // set boundary to repeat 
     206                int boundS = 1; int boundT = 1; 
     207                 
    207208                ofile.write(reinterpret_cast<char *>(&boundS), sizeof(int)); 
    208209                ofile.write(reinterpret_cast<char *>(&boundT), sizeof(int)); 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ResourceManager.cpp

    r3146 r3152  
    367367        str.read(reinterpret_cast<char *>(&texCoordCount), sizeof(int)); 
    368368 
     369        cout<<"here3" << texCoordCount << endl; 
    369370        if (texCoordCount) 
    370371        { 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp

    r3151 r3152  
    471471        //-- load some dynamic stuff 
    472472 
    473         //resourceManager->mUseNormalMapping = true; 
     473        resourceManager->mUseNormalMapping = true; 
    474474        //resourceManager->mUseNormalMapping = false; 
    475475 
    476         //LoadModel("fisch.dem", dynamicObjects); 
     476        LoadModel("fisch.dem", dynamicObjects); 
    477477        //LoadModel("hbuddha.dem", dynamicObjects); 
    478478        //LoadModel("venusm.dem", dynamicObjects); 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/normalMapping.cg

    r3146 r3152  
    160160        // as it is the inverse of a rotation matrix  
    161161        float3x3 tangToWorldTrafo = transpose(float3x3(IN.tangent.xyz, IN.bitangent.xyz, IN.normal.xyz)); 
    162         const float3 tangentSpaceNorm = tex2Dlod(normalMap, float4(IN.texCoord.xy, 0, 0)).xyz; 
     162        const float3 tangentSpaceNorm = normalize(tex2Dlod(normalMap, float4(IN.texCoord.xy, 0, 0)).xyz); 
     163        //const float3 tangentSpaceNorm = tex2D(normalMap, IN.texCoord.xy).xyz; 
     164 
    163165        pix.normal = mul(tangToWorldTrafo, tangentSpaceNorm); 
    164         pix.normal = tangentSpaceNorm; 
     166        //pix.color.xyz = tangentSpaceNorm; 
     167 
    165168        return pix; 
    166169} 
Note: See TracChangeset for help on using the changeset viewer.