SHARE
TWEET

output code (simplified)

a guest Dec 19th, 2018 8 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         private void _initPhongSpec(ModelMeshPart part, GameObject go) {
  2.             part.Effect = go.Shader;
  3.             part.Effect.Parameters["World"].SetValue(go.PositionRoot * mxWorld);
  4.             part.Effect.Parameters["BaseColor"].SetValue(new Vector3(.2f, .4f, .2f));
  5.             part.Effect.Parameters["View"].SetValue(mxView);
  6.             part.Effect.Parameters["Projection"].SetValue(mxProjection);
  7.             part.Effect.Parameters["CameraPosition"].SetValue(mxView.Translation);
  8.         }
  9.  
  10. foreach (var mesh in go.GameModel.Meshes) {
  11.      foreach (var part in mesh.MeshParts)
  12.           go.EffectInit(part, go);
  13.      mesh.Draw();
  14. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top