With that said, I haven't found any tutorials on how to use shaders without effects, except for one. Any links to tutorials that uses the shader pipeline and does not use effects (preferably D3D10) is greatly appreciated.
Anyway, I have quite a few questions...
When rendering with D3D9 :
1) I don't need any technique code like
technique ShaderModel2_Technique{ pass P0 { vertexShader = compile ... pixelShader = compile ... }}
since I'll tell it how to compile the shaders with D3DXCompileShaderFromFile, right?
2) How do I do multiple passes with the shaders?
What I mean is with effects you would do something like this :
for( unsigned m = 0; m < NumPasses; m++ ){ Effect->BeginPass( m );
how do I do it without effects?
When rendering with D3D10 :
Do I need to have technique code inside my shader? Because when rendering with the effects, I had to do something like this when creating the input layout :
D3D10_PASS_DESC PassDesc;Tech->GetPassByIndex( 0 )->GetDesc( &PassDesc );m_pd3dDevice->CreateInputLayout( pLayout, dwNumInputElements, PassDesc.pIAInputSignature, ... );
Compiling and creating the shaders seem simple enough, I just need to call "D3DX10CompileFromFile" and "ID3D10Device::CreateVertexShader"/"ID3D10Device::CreatePixelShader", but how do I do everything else like :
1) interlacing with (point to) the variables inside a shader? Is there an equivalent to ID3DXCONSTANTTABLE?
2) setting the variables inside the shader
and most importantly
3) render using the shaders?