Ver código fonte

Tweaks as suggested by @SimonDarksideJ, to get things rendering.

CartBlanche 1 mês atrás
pai
commit
97c164696d

+ 1 - 2
ShatterEffectSample/Core/Content/Content.mgcb

@@ -53,8 +53,7 @@
 /processorParam:RotationX=0
 /processorParam:RotationY=0
 /processorParam:RotationZ=0
-/processorParam:Scale=0.1
+/processorParam:Scale=15
 /processorParam:SwapWindingOrder=False
 /processorParam:TextureFormat=Compressed
-/processorParam:MeshCollisionEnabled=true
 /build:model\ship1.fbx

BIN
ShatterEffectSample/Core/Content/engine_diff_tex.tga


BIN
ShatterEffectSample/Core/Content/turret_alt_diff_tex.tga


+ 6 - 3
ShatterEffectSample/Processor/ShatterProcessor.cs

@@ -171,14 +171,17 @@ namespace ShatterEffectProcessor
         {
             EffectMaterialContent effect = new EffectMaterialContent();
             // Use our own ShatterEffect.fx instead of BasicEffect.
-            effect.Effect =
-                new ExternalReference<EffectContent>("shatterEffect.fx");
+            effect.Effect = new ExternalReference<EffectContent>("shatterEffect.fx");
 
             foreach (ExternalReference<TextureContent> texture in
                                                             material.Textures.Values)
             {
                 // Add the textures in the source Material to our effect.
-                effect.Textures.Add("modelTexture", texture);
+                if (!effect.Textures.ContainsKey("modelTexture"))
+                {
+                    context.Logger.LogMessage("Adding texture: " + texture.Name);
+                    effect.Textures.Add("modelTexture", texture);
+                }
             }
             return base.ConvertMaterial(effect, context);
         }