UnityEngine.Graphics.SetRandomWriteTarget C# (CSharp) Method

SetRandomWriteTarget() public static method

Set random write target for Shader Model 5.0 level pixel shaders.

public static SetRandomWriteTarget ( int index, ComputeBuffer uav, [ preserveCounterValue ) : void
index int Index of the random write target in the shader.
uav ComputeBuffer RenderTexture to set as write target.
preserveCounterValue [ Whether to leave the append/consume counter value unchanged.
return void
        public static void SetRandomWriteTarget(int index, ComputeBuffer uav, [UnityEngine.Internal.DefaultValue("false")] bool preserveCounterValue)
        {
            if (uav == null)
            {
                throw new ArgumentNullException("uav");
            }
            if (uav.m_Ptr == IntPtr.Zero)
            {
                throw new ObjectDisposedException("uav");
            }
            Internal_SetRandomWriteTargetBuffer(index, uav, preserveCounterValue);
        }

Same methods

Graphics::SetRandomWriteTarget ( int index, ComputeBuffer uav ) : void
Graphics::SetRandomWriteTarget ( int index, RenderTexture uav ) : void

Usage Example

コード例 #1
0
ファイル: Graphics.cs プロジェクト: yiifans/UnityDecompiled
        public static void SetRandomWriteTarget(int index, ComputeBuffer uav)
        {
            bool preserveCounterValue = false;

            Graphics.SetRandomWriteTarget(index, uav, preserveCounterValue);
        }