EMT_PARALLAX_MAP_SOLID render artifacts

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
pippy3
Posts: 155
Joined: Tue Dec 15, 2009 7:32 am

EMT_PARALLAX_MAP_SOLID render artifacts

Post by pippy3 »

I'm having some trouble getting EMT_PARALLAX_MAP_SOLID to render correctly.

I've played with the makeNormalMapTexture values and the MaterialTypeParam, also the saturation values of the depth image.

When it renders it has almost stripes through it. The textures are both 128x128. I have a video card that supports EMT_PARALLAX_MAP_SOLID in the example.

Image

Code: Select all

							((scene::ISkinnedMesh*)mesh)->convertMeshToTangents(); 
							video::ITexture* NormalMap = driver->getTexture("art/box-bump.bmp"); 
							if (NormalMap) 
							{ 
								driver->makeNormalMapTexture(NormalMap, 9.0f); 
								mesh->setMaterialTexture(0, driver->getTexture("art/box.bmp")); 
								mesh->setMaterialTexture(1, NormalMap); 
								mesh->setMaterialType(video::EMT_PARALLAX_MAP_SOLID); 
								mesh->getMaterial(0).MaterialTypeParam = 0.035f; 
							} 

I can't figure out why it would do this. I've rewritten my code many times (including addAnimatedMeshSceneNode with SAnimatedMesh from a createMeshWithTangents)

Anyone else seen this before?
pippy3
Posts: 155
Joined: Tue Dec 15, 2009 7:32 am

Post by pippy3 »

hah. As soon as I post it I solve a 2 day problem.

Code: Select all

//driver->makeNormalMapTexture(NormalMap, 9.0f); 
Was being called multiple times.
Post Reply