本文整理汇总了C#中Axiom.Core.SceneManager.InjectRenderWithPass方法的典型用法代码示例。如果您正苦于以下问题:C# SceneManager.InjectRenderWithPass方法的具体用法?C# SceneManager.InjectRenderWithPass怎么用?C# SceneManager.InjectRenderWithPass使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Axiom.Core.SceneManager
的用法示例。
在下文中一共展示了SceneManager.InjectRenderWithPass方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Execute
/// <summary>
///
/// </summary>
/// <param name="sm"></param>
/// <param name="rs"></param>
public override void Execute( SceneManager sm, RenderSystem rs )
{
// Fire listener
Instance.OnMaterialRender( new CompositorInstanceMaterialEventArgs( PassId, Material ) );
var vp = rs.Viewport;
var rect = (Rectangle2D)CompositorManager.Instance.TexturedRectangle2D;
if ( QuadCornerModified )
{
// ensure positions are using peculiar render system offsets
float hOffset = rs.HorizontalTexelOffset/( 0.5f*vp.ActualWidth );
float vOffset = rs.VerticalTexelOffset/( 0.5f*vp.ActualHeight );
rect.SetCorners( QuadLeft + hOffset, QuadTop - vOffset, QuadRight + hOffset, QuadBottom - vOffset );
}
if ( QuadFarCorners )
{
var corners = vp.Camera.WorldSpaceCorners;
if ( QuadFarCornersViewSpace )
{
var viewMat = vp.Camera.FrustumViewMatrix;
rect.SetNormals( viewMat*corners[ 5 ], viewMat*corners[ 6 ], viewMat*corners[ 4 ], viewMat*corners[ 7 ] );
}
else
{
rect.SetNormals( corners[ 5 ], corners[ 6 ], corners[ 4 ], corners[ 7 ] );
}
}
// Queue passes from mat
for ( var i = 0; i < Technique.PassCount; i++ )
{
var pass = Technique.GetPass( i );
sm.InjectRenderWithPass( pass, CompositorManager.Instance.TexturedRectangle2D, false
/*don't allow replacement of shadow passes*/ );
}
}
示例2: Execute
public override void Execute(SceneManager sm, RenderSystem rs)
{
// Fire listener
instance.FireNotifyMaterialRender(pass_id, mat);
// Queue passes from mat
for (int i=0; i<technique.NumPasses; i++) {
Pass pass = technique.GetPass(i);
sm.InjectRenderWithPass(pass,
CompositorManager.Instance.GetTexturedRectangle2D(),
false // don't allow replacement of shadow passes
);
}
}