当前位置: 首页>>代码示例>>C#>>正文


C# SceneManager.InjectRenderWithPass方法代码示例

本文整理汇总了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*/ );
			}
		}
开发者ID:ryan-bunker,项目名称:axiom3d,代码行数:41,代码来源:CompositorInstance.cs

示例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
                                 );
     }
 }
开发者ID:ufosky-server,项目名称:MultiversePlatform,代码行数:13,代码来源:CompositorInstance.cs


注:本文中的Axiom.Core.SceneManager.InjectRenderWithPass方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。