POM Textures only showing 1 texture on mesh.

Started by
0 comments, last by sirob 15 years, 5 months ago
Okay, i have modified the SDK sample for Parallax Occlusion Mapping and got it to work (VERY NICE EFFECT) pretty hard on the FPS though, but int the sample there is only 1 big mesh with 1 texture. i made a .X file with 2 planes in 3ds with 2 different color_map textures. i then load up all the textures but when viewing my mesh only 1 of the two planes is showing. How do i draw the mesh with all textures? (and of course the right normal_map set for it)? think all my textures are being loaded correct and is in memory with according normal_map, but it will just show one on my mesh. i think this is the key, don´t know how to make it work though... // Render the scene: V( g_pEffect->SetTechnique( "RenderSceneWithPOM" ) ); V( g_pEffect->Begin( &cPasses, 0 ) ); for ( iPass = 0; iPass < cPasses; iPass++ ) { V( g_pEffect->BeginPass( iPass ) ); V( g_pMesh->DrawSubset(0) ); V( g_pEffect->EndPass() ); } V( g_pEffect->End() );
Advertisement
The code you showed is only rendering subset 0 of the mesh, which is the first subset. If you want to render other subsets, you'll need to modify the code to loop over all subsets and render them all.
Sirob Yes.» - status: Work-O-Rama.

This topic is closed to new replies.

Advertisement