本文整理汇总了C#中IGraphicsService.GetDefaultNormalTexture方法的典型用法代码示例。如果您正苦于以下问题:C# IGraphicsService.GetDefaultNormalTexture方法的具体用法?C# IGraphicsService.GetDefaultNormalTexture怎么用?C# IGraphicsService.GetDefaultNormalTexture使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IGraphicsService
的用法示例。
在下文中一共展示了IGraphicsService.GetDefaultNormalTexture方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TerrainMaterialLayer
//--------------------------------------------------------------
/// <overloads>
/// <summary>
/// Initializes a new instance of the <see cref="TerrainMaterialLayer"/> class.
/// </summary>
/// </overloads>
///
/// <summary>
/// Initializes a new instance of the <see cref="TerrainMaterialLayer"/> class with the default
/// material.
/// </summary>
/// <param name="graphicService">The graphic service.</param>
/// <exception cref="ArgumentNullException">
/// <paramref name="graphicService"/> is <see langword="null"/>.
/// </exception>
public TerrainMaterialLayer(IGraphicsService graphicService)
{
if (graphicService == null)
throw new ArgumentNullException("graphicService");
var effect = graphicService.Content.Load<Effect>("DigitalRune/Terrain/TerrainMaterialLayer");
Material = new Material
{
{ "Detail", new EffectBinding(graphicService, effect, null, EffectParameterHint.Material) }
};
FadeOutStart = int.MaxValue;
FadeOutEnd = int.MaxValue;
TileSize = 1;
DiffuseColor = new Vector3F(1, 1, 1);
SpecularColor = new Vector3F(1, 1, 1);
SpecularPower = 10;
Alpha = 1;
DiffuseTexture = graphicService.GetDefaultTexture2DWhite();
SpecularTexture = graphicService.GetDefaultTexture2DBlack();
NormalTexture = graphicService.GetDefaultNormalTexture();
HeightTextureScale = 1;
HeightTextureBias = 0;
HeightTexture = graphicService.GetDefaultTexture2DBlack();
TriplanarTightening = -1;
TintStrength = 1;
TintTexture = graphicService.GetDefaultTexture2DWhite();
BlendThreshold = 0.5f;
BlendRange = 1f;
BlendHeightInfluence = 0;
BlendNoiseInfluence = 0;
BlendTextureChannel = 0;
BlendTexture = graphicService.GetDefaultTexture2DWhite();
NoiseTileSize = 1;
TerrainHeightMin = -1e20f;
TerrainHeightMax = +1e20f;
TerrainHeightBlendRange = 1f;
TerrainSlopeMin = -ConstantsF.Pi;
TerrainSlopeMax = ConstantsF.Pi;
TerrainSlopeBlendRange = MathHelper.ToRadians(10);
}
示例2: TerrainRoadLayer
//--------------------------------------------------------------
/// <overloads>
/// <summary>
/// Initializes a new instance of the <see cref="TerrainRoadLayer"/> class.
/// </summary>
/// </overloads>
///
/// <summary>
/// Initializes a new instance of the <see cref="TerrainRoadLayer"/> class with the default
/// material.
/// </summary>
/// <param name="graphicService">The graphic service.</param>
/// <exception cref="ArgumentNullException">
/// <paramref name="graphicService"/> is <see langword="null"/>.
/// </exception>
public TerrainRoadLayer(IGraphicsService graphicService)
{
if (graphicService == null)
throw new ArgumentNullException("graphicService");
var effect = graphicService.Content.Load<Effect>("DigitalRune/Terrain/TerrainRoadLayer");
Material = new Material
{
{ "Detail", new EffectBinding(graphicService, effect, null, EffectParameterHint.Material) }
};
FadeOutStart = int.MaxValue;
FadeOutEnd = int.MaxValue;
TileSize = 1;
DiffuseColor = new Vector3F(1, 1, 1);
SpecularColor = new Vector3F(1, 1, 1);
SpecularPower = 10;
Alpha = 1;
DiffuseTexture = graphicService.GetDefaultTexture2DWhite();
SpecularTexture = graphicService.GetDefaultTexture2DBlack();
NormalTexture = graphicService.GetDefaultNormalTexture();
HeightTextureScale = 1;
HeightTexture = graphicService.GetDefaultTexture2DBlack();
RoadLength = 1;
}
示例3: TerrainDecalLayer
//--------------------------------------------------------------
/// <overloads>
/// <summary>
/// Initializes a new instance of the <see cref="TerrainDecalLayer"/> class.
/// </summary>
/// </overloads>
///
/// <summary>
/// Initializes a new instance of the <see cref="TerrainDecalLayer"/> class with the default
/// material.
/// </summary>
/// <param name="graphicService">The graphic service.</param>
/// <exception cref="ArgumentNullException">
/// <paramref name="graphicService"/> is <see langword="null"/>.
/// </exception>
public TerrainDecalLayer(IGraphicsService graphicService)
{
if (graphicService == null)
throw new ArgumentNullException("graphicService");
// Use a down orientation per default.
Pose = new Pose(Matrix33F.CreateRotationX(-ConstantsF.PiOver2));
var effect = graphicService.Content.Load<Effect>("DigitalRune/Terrain/TerrainDecalLayer");
Material = new Material
{
{ "Detail", new EffectBinding(graphicService, effect, null, EffectParameterHint.Material) }
};
FadeOutStart = int.MaxValue;
FadeOutEnd = int.MaxValue;
Width = 1;
Height = 1;
DiffuseColor = new Vector3F(1, 1, 1);
SpecularColor = new Vector3F(1, 1, 1);
SpecularPower = 10;
Alpha = 1;
DiffuseTexture = graphicService.GetDefaultTexture2DWhite();
SpecularTexture = graphicService.GetDefaultTexture2DBlack();
NormalTexture = graphicService.GetDefaultNormalTexture();
HeightTextureScale = 1;
HeightTexture = graphicService.GetDefaultTexture2DBlack();
UpdateAabb();
}