本文整理汇总了C#中Texture2D.RemoveFromLastAssignedSlotUAV方法的典型用法代码示例。如果您正苦于以下问题:C# Texture2D.RemoveFromLastAssignedSlotUAV方法的具体用法?C# Texture2D.RemoveFromLastAssignedSlotUAV怎么用?C# Texture2D.RemoveFromLastAssignedSlotUAV使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Texture2D
的用法示例。
在下文中一共展示了Texture2D.RemoveFromLastAssignedSlotUAV方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ApplyBilateralFiltering
private void ApplyBilateralFiltering( Texture2D _Source, Texture2D _Target, float _BilateralRadius, float _BilateralTolerance, bool _Wrap )
{
_Source.SetCS( 0 );
_Target.SetCSUAV( 0 );
m_CB_Filter.m.Radius = _BilateralRadius;
m_CB_Filter.m.Tolerance = _BilateralTolerance;
m_CB_Filter.m.Tile = (uint) (_Wrap ? 1 : 0);
m_CS_BilateralFilter.Use();
uint h = Math.Max( 1, MAX_LINES*1024 / W );
uint callsCount = (uint) Math.Ceiling( (float) H / h );
for ( uint i=0; i < callsCount; i++ ) {
m_CB_Filter.m.Y0 = i * h;
m_CB_Filter.UpdateData();
m_CS_BilateralFilter.Dispatch( W, h, 1 );
m_device.Present( true );
progressBar.Value = (int) (0.01f * (0 + BILATERAL_PROGRESS * (i+1) / callsCount) * progressBar.Maximum);
// for ( int a=0; a < 10; a++ )
Application.DoEvents();
}
// Single gulp (crashes the driver on large images!)
// m_CS_BilateralFilter.Dispatch( W, H, 1 );
_Target.RemoveFromLastAssignedSlotUAV(); // So we can use it as input for next stage
}