• R/O
  • SSH
  • HTTPS

mmdx: Commit


Commit MetaInfo

Revision76 (tree)
Zeit2010-03-21 15:33:52
Autorwilfrem

Log Message

drawルーチンの調整

Ändern Zusammenfassung

Diff

--- trunk/MikuMikuDanceXNA/Model/MMDModel.cs (revision 75)
+++ trunk/MikuMikuDanceXNA/Model/MMDModel.cs (revision 76)
@@ -264,6 +264,9 @@
264264 //ライティング設定の取得
265265 Vector3 LightVector, LightColor;
266266 mmdXNA.LightManager.GetParameters(out LightVector, out LightColor);
267+ //モデルdraw用の設定
268+ graphics.RenderState.AlphaBlendEnable = false;
269+ graphics.RenderState.AlphaTestEnable = false;
267270 //モデルのCullModeを変更
268271 CullMode mode = graphics.RenderState.CullMode;
269272 graphics.RenderState.CullMode = CullMode.None;
--- trunk/MikuMikuDanceXNA/Model/MMDFaceManager.cs (revision 75)
+++ trunk/MikuMikuDanceXNA/Model/MMDFaceManager.cs (revision 76)
@@ -61,6 +61,8 @@
6161 {
6262 if (facename == "base")
6363 return;//baseは何もしない……
64+ if (!FaceDictionary.ContainsKey(facename))
65+ return;//対象表情が無いのでパス
6466 //表情情報リストに登録しておく
6567 if (FaceRates.ContainsKey(facename))
6668 FaceRates[facename] = rate;
@@ -73,8 +75,6 @@
7375 //次に表情名に合わせて頂点とその移動量を合算する
7476 foreach (var face in FaceRates)
7577 {//各表情ごとに頂点移動量の合成処理
76- if (!FaceDictionary.ContainsKey(face.Key))
77- continue;//対象表情が無いのでパス
7878 foreach (var vert in model.ModelData.Skins[FaceDictionary[face.Key]].SkinVerts)
7979 {
8080 FaceTranslations[vert.VertIndex] += (new Vector4(vert.Pos[0], vert.Pos[1], vert.Pos[2], 0) * face.Value);
--- trunk/MikuMikuDanceXNA/Accessory/MMDAccessory.cs (revision 75)
+++ trunk/MikuMikuDanceXNA/Accessory/MMDAccessory.cs (revision 76)
@@ -101,8 +101,6 @@
101101 }
102102 mesh.Draw();
103103 }
104- //元に戻す
105- Game.GraphicsDevice.RenderState.AlphaBlendEnable = false;
106104 //CullModeの変更を戻す
107105 Game.GraphicsDevice.RenderState.CullMode = mode;
108106
Show on old repository browser