InjectRenderWithPass() public method

public InjectRenderWithPass ( Pass pass, IRenderable rend ) : void
pass Pass
rend IRenderable
return void
		/// <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*/ );
			}
		}
 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
                                 );
     }
 }