Changeset 3152
- Timestamp:
- 11/21/08 09:19:15 (16 years ago)
- 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 195 195 { 196 196 // hack 197 const string texName(" fischi_u1_v1.png");197 const string texName("FischiNormalmap.png"); 198 198 //const string texName("wood.jpg"); 199 199 … … 203 203 ofile.write(texName.c_str(), sizeof(char) * texnameSize); 204 204 205 int boundS = 1, boundT = 1; 206 205 // set boundary to repeat 206 int boundS = 1; int boundT = 1; 207 207 208 ofile.write(reinterpret_cast<char *>(&boundS), sizeof(int)); 208 209 ofile.write(reinterpret_cast<char *>(&boundT), sizeof(int)); -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ResourceManager.cpp
r3146 r3152 367 367 str.read(reinterpret_cast<char *>(&texCoordCount), sizeof(int)); 368 368 369 cout<<"here3" << texCoordCount << endl; 369 370 if (texCoordCount) 370 371 { -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp
r3151 r3152 471 471 //-- load some dynamic stuff 472 472 473 //resourceManager->mUseNormalMapping = true;473 resourceManager->mUseNormalMapping = true; 474 474 //resourceManager->mUseNormalMapping = false; 475 475 476 //LoadModel("fisch.dem", dynamicObjects);476 LoadModel("fisch.dem", dynamicObjects); 477 477 //LoadModel("hbuddha.dem", dynamicObjects); 478 478 //LoadModel("venusm.dem", dynamicObjects); -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/normalMapping.cg
r3146 r3152 160 160 // as it is the inverse of a rotation matrix 161 161 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 163 165 pix.normal = mul(tangToWorldTrafo, tangentSpaceNorm); 164 pix.normal = tangentSpaceNorm; 166 //pix.color.xyz = tangentSpaceNorm; 167 165 168 return pix; 166 169 }
Note: See TracChangeset
for help on using the changeset viewer.