title: Can I calculate global variable in HLSL before vertex shader applied?
body: <p>there are three global variable g_A, g_B, g_C
  I want to do this; <code>g_C = g_A * g_B</code></p>
  
  <p>I tried this;</p>
  
  <pre><code>technique RenderScene
  {
      g_C = g_A * g_B;
  
      pass P0
      {          
          VertexShader = compile vs_2_0 RenderSceneVS();
          PixelShader  = compile ps_2_0 RenderScenePS(); 
      }
  }
  </code></pre>
  
  <p>However, it's improper syntax.
  What should I do?</p>
  
  <p>Must I calculate this variable in c++ code before rendering?</p>