   Shader Const table
  Hi, I have a simple question about vertex shader.I have a file with two vertex shaders which share the same variable, just like:int var1 = 10;vs_main_1( ... ){  ... = var1;}vs_main_2( ... ){  ... = var1;}And I compile the two shaders on app initializing with D3DXCompileShaderFromFile(). I know the shader is created with a related const table. But I do not know what will happen if I change the var through code like:pConstTbl_1->SetValue( "var1", 100 );Does the var1 in shader [vs_main_2] will change or not? Thanks very much.   
  It should not.   ;  Each shader will have it's own constant table, since each has to be compiled seperately with a call to D3DXD3DXCompileShaderFromFile.  Therefore changes to shader constants for one shader will not affect shader constants in another, each will have it's own set of constants (even if they have the same names in the HLSL).If you want to your shaders to be more logically grouped together and to share shader constants, you should consider using the Effects framework.   ;Quote:Original post by MJPEach shader will have it's own constant table, since each has to be compiled seperately with a call to D3DXD3DXCompileShaderFromFile.  Therefore changes to shader constants for one shader will not affect shader constants in another, each will have it's own set of constants (even if they have the same names in the HLSL).If you want to your shaders to be more logically grouped together and to share shader constants, you should consider using the Effects framework.Understand.Thanks very much!   