本文整理汇总了C#中SceneManager.SetShadowTextureSize方法的典型用法代码示例。如果您正苦于以下问题:C# SceneManager.SetShadowTextureSize方法的具体用法?C# SceneManager.SetShadowTextureSize怎么用?C# SceneManager.SetShadowTextureSize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SceneManager
的用法示例。
在下文中一共展示了SceneManager.SetShadowTextureSize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateScene
protected static void CreateScene()
{
sceneMgr = _root.CreateSceneManager(SceneType.ST_EXTERIOR_CLOSE);
//Image combined = new Image();
//combined.LoadTwoImagesAsRGBA("terra_DIFFUSE.png", "terra_SPECULAR.png", "General", PixelFormat.PF_BYTE_RGBA);
//combined.Save("terra_diffusespecular.png");
//combined.LoadTwoImagesAsRGBA("terra_NORMAL.png", "terra_DISP.png", "General", PixelFormat.PF_BYTE_RGBA);
//combined.Save("terra_normalheight.png");
_cam = sceneMgr.CreateCamera("Camera");
_cam.Pitch(-0.78f);
_cam.NearClipDistance = 5f;
_cam.FarClipDistance = 99999 * 6;
_cam.Move(new Vector3(1084, 346, 1317));
viewport = _window.AddViewport(_cam);
_cam.AspectRatio = (float)viewport.ActualWidth / (float)viewport.ActualHeight;
sceneMgr.ShadowTechnique = ShadowTechnique.SHADOWTYPE_TEXTURE_MODULATIVE;
sceneMgr.ShadowTextureCount = 8;
sceneMgr.SetShadowTextureSize(8192);
CreateNewDude("1");
CreateNewDude("2");
Vector3 lightDir = new Vector3(0.55f, -0.3f, 0.75f);
lightDir.Normalise();
Light light = sceneMgr.CreateLight("tstLight");
light.Type = Light.LightTypes.LT_DIRECTIONAL;
light.Direction = lightDir;
light.DiffuseColour = ColourValue.White;
light.SpecularColour = ColourValue.White;
light.CastShadows = false;
light.Visible = true;
sceneMgr.AmbientLight = ColourValue.White;
tgo = new TerrainGlobalOptions();
tg = new TerrainGroup(sceneMgr, Terrain.Alignment.ALIGN_X_Z, 513, 12000.0f);
tg.SetFilenameConvention("Asd", "dat");
tg.Origin = new Vector3(0, -250, 0);
ConfigureTerrainDefaults(light);
for (int x = 0; x <= 0; ++x)
{
for (int y = 0; y <= 0; ++y)
{
DefineTerrain(x, y);
}
}
tg.LoadAllTerrains(true);
if (mTerrainImported)
{
foreach (TerrainGroup.TerrainSlot t in tg.GetTerrainIterator())
{
InitBlendMaps(t.instance);
}
}
tg.FreeTemporaryResources();
// tg.SaveAllTerrains(true);
hydrax = new MHydrax.MHydrax(sceneMgr, _cam, viewport);
hydrax.Components = MHydraxComponent.HYDRAX_COMPONENTS_ALL;
Plane p = new Plane(new Vector3(0, 1, 0), new Vector3(0, 0, 0));
MHydrax.MProjectedGrid m = new MProjectedGrid(hydrax,
new MPerlin(new MPerlin.MOptions(8, 0.085f, 0.49f, 1.4f, 1.27f, 2, new Vector3(0.5f, 50, 150000))),
p,
MMaterialManager.MNormalMode.NM_VERTEX,
new MHydrax.MProjectedGrid.MOptions(56, 35, 50, false, false, false, 3.75f));
hydrax.SetModule(m);
hydrax.CfgFileManager.Load("TestiPeli.hdx");
hydrax.Create();
// sceneMgr.SetSkyDome(true, "Examples/CloudySky", 5, 8);
mRect = new SelectionRectangle("Selection SelectionRectangle");
sceneMgr.RootSceneNode.CreateChildSceneNode("debug_object").AttachObject(mRect);
mRect._camera = _cam;
ct = new CollisionTools(sceneMgr);
SetupCaelum(viewport, _window);
}