I've got a problem when loading objects using assimp. I did succesfully load vertex data and I am able to draw static mesh (without bones and animations, I've got few bugs there but I'll go back to solving that problem after I solve this one). Back to the problem. I have loaded texture coords using this code
tmp.Tex.x = modelScene->mMeshes[i]->mTextureCoords[j].x; tmp.Tex.y = modelScene->mMeshes[i]->mTextureCoords[j].y;
of course it is in cycle for all meshes and all vertices (i, j respectively).
I tried almost all permutations of post loading flags that had something to do with UV coordinates and nothing helped (only the yellow spots changed it's color to green in some cases).
Textures should be loaded correctly (I checked file names in debugger and they were correct) then I loaded it using directX functions for that so no problems should not there.
The code for drawing is basically the same as in the book from Frank Luna, with minor changes (because I redesigned the whole framework to my needs). Shader is whole from the book.
I am hopeless already. I am looking for working way to load my models (fbx, dae) to my demo for almost 2 months now and nothing worked (this is the closest I've got), so if anyone have seen anything similar I would be really grateful for any pointers on where to look for problem.
EDIT 1: So I tried to draw the texture on the quad using the same shader I use for drawing on model and somehow I used wrong TangentU and Normals what resulted in the picture on quad being black with occasional (when I moved camera) white stripes with shades of the actual texture so can't this problem have anything to do with tangents or normals? Or maybe something with TangentU being something different than actual Tangent? Code I use to load those is:
tmp.Normal.x = modelScene->mMeshes[i]->mNormals[j].x; tmp.Normal.y = modelScene->mMeshes[i]->mNormals[j].y; tmp.Normal.z = modelScene->mMeshes[i]->mNormals[j].z; tmp.TangentU.x = modelScene->mMeshes[i]->mTangents[j].x; tmp.TangentU.y = modelScene->mMeshes[i]->mTangents[j].y; tmp.TangentU.z = modelScene->mMeshes[i]->mTangents[j].z;