Jump to content
  • Advertisement
Sign in to follow this  
Meshboy

POM Textures only showing 1 texture on mesh.

This topic is 3639 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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() );

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!