本文整理汇总了C#中RenderHelper.RenderSceneDepth方法的典型用法代码示例。如果您正苦于以下问题:C# RenderHelper.RenderSceneDepth方法的具体用法?C# RenderHelper.RenderSceneDepth怎么用?C# RenderHelper.RenderSceneDepth使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RenderHelper
的用法示例。
在下文中一共展示了RenderHelper.RenderSceneDepth方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RenderShadowMap
private void RenderShadowMap(GameTime gt, RenderHelper render, ref Matrix view, ref Matrix proj, IWorld world, IDeferredGBuffer deferredGBuffer)
{
render.PushRenderTarget(shadowRT);
render.Clear(Color.Transparent,ClearOptions.Target | ClearOptions.DepthBuffer,1,0);
render.RenderSceneDepth(world, gt, ref view, ref proj, true);
shadowMap = render.PopRenderTargetAsSingleRenderTarget2D();
}
示例2: RenderShadowMap
/// <summary>
/// Renders the shadow map using the orthographic camera created in
/// CalculateFrustum.
/// </summary>
/// <param name="gameTime">The game time.</param>
/// <param name="render">The render.</param>
/// <param name="splitIndex">Index of the split.</param>
/// <param name="world">The world.</param>
protected void RenderShadowMap(GameTime gameTime, RenderHelper render, int splitIndex, IWorld world)
{
// Set the viewport for the current split
Viewport splitViewport = new Viewport();
splitViewport.MinDepth = 0;
splitViewport.MaxDepth = 1;
splitViewport.Width = ShadowMapSize;
splitViewport.Height = ShadowMapSize;
splitViewport.X = splitIndex * ShadowMapSize;
splitViewport.Y = 0;
render.SetViewPort(splitViewport);
// Set up the effect
//shadowMapEffect.CurrentTechnique = shadowMapEffect.Techniques["GenerateShadowMap"];
//shadowMapEffect.Parameters["g_matViewProj"].SetValue(lightViewProjectionMatrices[splitIndex]);
// Draw the models
render.RenderSceneDepth(world, gameTime, ref lightViewMatrices[splitIndex], ref lightProjectionMatrices[splitIndex], true);
}