Exemplo n.º 1
0
        /// <summary>
        /// Constructor
        /// <param name="brushPos">The brush position</param>
        /// <param name="brushSize">The brush size</param>
        /// <param name="brushRotation">The brush rotation</param>
        /// </summary>
        public FilterContext(GraphicsFormat targetFormat, Vector3 brushPos, float brushSize, float brushRotation)
        {
            rtHandleCollection = new RTHandleCollection();
            floatProperties    = new Dictionary <string, float>();
            intProperties      = new Dictionary <string, int>();
            vectorProperties   = new Dictionary <string, Vector4>();

            this.brushPos      = brushPos;
            this.brushSize     = brushSize;
            this.brushRotation = brushRotation;
            this.targetFormat  = targetFormat;
        }
Exemplo n.º 2
0
        private void Init()
        {
            if (!m_initialized)
            {
                m_rtCollection = new RTHandleCollection();
                m_rtCollection.AddRTHandle(RenderTextureIDs.cameraView, "cameraView", GraphicsFormat.R8G8B8A8_SRGB);
                m_rtCollection.AddRTHandle(RenderTextureIDs.meshStamp, "meshStamp", GraphicsFormat.R16_SFloat);
                m_rtCollection.AddRTHandle(RenderTextureIDs.meshStampPreview, "meshStampPreview", GraphicsFormat.R16_SFloat);
                m_rtCollection.AddRTHandle(RenderTextureIDs.meshStampMask, "meshStampMask", GraphicsFormat.R16_UNorm);
                m_rtCollection.AddRTHandle(RenderTextureIDs.sourceHeight, "sourceHeight", GraphicsFormat.R16_UNorm);
                m_rtCollection.AddRTHandle(RenderTextureIDs.combinedHeight, "combinedHeight", GraphicsFormat.R16_UNorm);

                m_initialized = true;
            }
        }