XNA阴影映射-模型无效?
我尝试使用来自示例的阴影映射。 当我尝试加载模型时,出现以下异常:XNA阴影映射-模型无效?,xna,Xna,我尝试使用来自示例的阴影映射。 当我尝试加载模型时,出现以下异常: effect.CurrentTechnique = effect.Techniques[techniqueName]; 模型法 An unhandled exception of type 'System.ArgumentNullException' occurred in Microsoft.Xna.Framework.Graphics.dll Additional information: This method does
effect.CurrentTechnique = effect.Techniques[techniqueName];
模型法
An unhandled exception of type 'System.ArgumentNullException' occurred in Microsoft.Xna.Framework.Graphics.dll
Additional information: This method does not accept null for this parameter.
我的模型有什么问题?请检查
techniqueName
变量是否为null
我打赌
效果。技巧[null]
抛出一个系统。ArgumentNullException
出于同样的原因抛出一个系统。它不是null。技术名称为“CreateShadowMap”。我不知道我能用它做什么。我可能应该看到“发生在Microsoft.Xna.Framework.Graphics.dll中”。我一无所有;也许可以看看effect.technologies[“CreateShadowMap”]是否返回null并将effect.CurrentTechnical设置为null.Ok。效果:技术不包含“CreateShadowMap”和“DrawWithShadowMap”。只有“基本效果”。那我该怎么办?我想这和我的模特有关。但是什么呢?是否需要以某种“特殊方式”创建效果?我认为您要么必须自己手动定义并添加效果,要么将其烘焙到您正在处理的模型数据中。你的模型是从哪里来的?第一个是从SkinnignSample来的。第二个是我创造的。他们两个都不工作