/// <summary> /// 利用材质实例的特定通道,将指定纹理渲染至目标RenderToTexture /// </summary> /// <param name="source">指定的纹理</param> /// <param name="destination">目标RenderToTexture</param> /// <param name="material">材质实例</param> /// <param name="passIndex">材质实例的通道</param> public static void BlitImage(Texture source, RenderToTexture destination, MaterialInstance material, int passIndex) { if (null == source) { ICall_GraphicSystem_BlitImage(IntPtr.Zero, destination, material, passIndex); } else { ICall_GraphicSystem_BlitImage(source.GetTextureHandlePtr(), destination, material, passIndex); } }
/// <summary> /// 为材质中的纹理参数设置纹理 /// </summary> /// <param name="paramName">材质中的纹理参数名称</param> /// <param name="texture">要设置的纹理</param> public void SetTexture(String paramName, Texture texture) { ICall_Material_SetTexture(this, paramName, texture.GetTextureHandlePtr()); }