Skip to content

Instantly share code, notes, and snippets.

@baobao
Last active December 7, 2018 02:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save baobao/579848e2ab50a2aae3e9e01e81080c55 to your computer and use it in GitHub Desktop.
Save baobao/579848e2ab50a2aae3e9e01e81080c55 to your computer and use it in GitHub Desktop.
SlimDX 回転行列を生成してそれをシェーダに渡す部分コード
// 回転行列生成
var axis = new Vector3(0.5f, 0, 1f);
var rotateMatrix = Matrix.RotationAxis(axis, radian);
// 回転行列をシェーダに渡す
var matrix = effect.GetVariableByName("RotateMatrix");
matrix.AsMatrix().SetMatrix(rotateMatrix);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment