i tried maybe all...rad SDK and i don't know how to chek it , can you plz tell me where i can see it?
P.S. If you sure where is the problem - can you simply say how to fix it?
You need to double check that you're uploading a proper world/view/projection matrix in your c++ code to your [color="#000000"]worldViewProj that is in your shader.
but how i can give my shader other variables? like this: float4x4 matWorld;
float4 vec_light;
for worldViewProj i have special function: g_pConstantTableVS->SetMatrix
but have can i set other vectors or matrixes? Or they just need to have same name?
VS_OUTPUT VS(float4 Pos : POSITION, float3 Normal : NORMAL)
{
VS_OUTPUT Out = (VS_OUTPUT)0;
Out.Pos = mul(Pos, matWorldViewProj); // transform Position
Out.Light = vecLightDir; // output light vector
Out.Norm = normalize(mul(Normal, matWorld)); // transform Normal and normalize it
return Out;
}
this shader code need texture coordinates, but when i use PIX - i see that all textures positions are 0. I update all variables in render:
for(int b =1;b<MeshCount+1;b++)
{
for( DWORD i = 0; i < g_dwNumMaterials; i++ )
{
g_bUseShaders = true;
I find all information that i need to, now shaders are working good. But there is the last thing that i cannot understand, i don't want start new topic, so : how to add to my mesh more then 1 textures?Mesh have 1 diffuse map, but in shader i need second texture for bump mapping, where can i add it to my mesh? For example in 3dsMax? Or where? Can i load it in code?