本文整理汇总了C#中GraphicFactory.CreateTexture2DPerlinNoise方法的典型用法代码示例。如果您正苦于以下问题:C# GraphicFactory.CreateTexture2DPerlinNoise方法的具体用法?C# GraphicFactory.CreateTexture2DPerlinNoise怎么用?C# GraphicFactory.CreateTexture2DPerlinNoise使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GraphicFactory
的用法示例。
在下文中一共展示了GraphicFactory.CreateTexture2DPerlinNoise方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadContent
protected override void LoadContent(GraphicInfo GraphicInfo, GraphicFactory factory ,IContentManager contentManager)
{
base.LoadContent(GraphicInfo,factory, contentManager);
Picking picking = new Picking(this);
this.AddScreenUpdateable(picking);
perlim = factory.CreateTexture2DPerlinNoise(512, 512, 0.03f, 3f, 0.5f, 1);
to = new TerrainObject(factory,perlim, Vector3.Zero, Matrix.Identity, MaterialDescription.DefaultBepuMaterial(), 2, 2);
//TerrainObject to = new TerrainObject(factory,"..\\Content\\Textures\\Untitled",Vector3.Zero,Matrix.Identity,MaterialDescription.DefaultBepuMaterial(),2,1);
TerrainModel stm = new TerrainModel(factory, to,"TerrainName","..\\Content\\Textures\\Terraingrass", "..\\Content\\Textures\\rock", "..\\Content\\Textures\\sand", "..\\Content\\Textures\\snow");
DeferredTerrainShader shader = new DeferredTerrainShader(TerrainType.MULTITEXTURE);
DeferredMaterial mat = new DeferredMaterial(shader);
IObject obj3 = new IObject(mat, stm, to);
this.World.AddObject(obj3);
#region NormalLight
DirectionalLightPE ld1 = new DirectionalLightPE(Vector3.Left, Color.White);
DirectionalLightPE ld2 = new DirectionalLightPE(Vector3.Right, Color.White);
DirectionalLightPE ld3 = new DirectionalLightPE(Vector3.Backward, Color.White);
DirectionalLightPE ld4 = new DirectionalLightPE(Vector3.Forward, Color.White);
DirectionalLightPE ld5 = new DirectionalLightPE(Vector3.Down, Color.White);
float li = 0.5f;
ld1.LightIntensity = li;
ld2.LightIntensity = li;
ld3.LightIntensity = li;
ld4.LightIntensity = li;
ld5.LightIntensity = li;
this.World.AddLight(ld1);
this.World.AddLight(ld2);
this.World.AddLight(ld3);
this.World.AddLight(ld4);
this.World.AddLight(ld5);
#endregion
this.World.CameraManager.AddCamera(new CameraFirstPerson(true,GraphicInfo));
SkyBoxSetTextureCube stc = new SkyBoxSetTextureCube("Textures//cubemap");
CommandProcessor.getCommandProcessor().SendCommandAssyncronous(stc);
///O PICKING FUNCIONA APENAS COM OBJETOS QUE TENHAM CORPO FISICO REAL !!!
///OS GHOST E OS DUMMY NUNCA SERAO SELECIONADOS
///Para ser informado a todo frame sobre as colisoes do raio, basta utilizar o outro construtor
picking.OnPickedLeftButton += new OnPicked(onPick);
}