Пример #1
0
 protected void InitBase(ref RenderPassDesc desc, int renderTargetCount)
 {
     if (desc.renderTargetDescs == null)
     {
         throw new ArgumentException("Must contain 'renderTargetDescs'");
     }
     if (desc.renderTargetDescs.Length != renderTargetCount)
     {
         throw new ArgumentException("'renderTargetDescs' length must match render targets length");
     }
     this.renderTargetCount = renderTargetCount;
 }
Пример #2
0
        public static RenderPassDesc CreateDefault(int renderTargetCount)
        {
            var result = new RenderPassDesc()
            {
                renderTargetDescs = new RenderPassRenderTargetDesc[renderTargetCount],
                depthStencilDesc  = RenderPassDepthStencilDesc.CreateDefault(true)
            };

            for (int i = 0; i != renderTargetCount; ++i)
            {
                result.renderTargetDescs[i] = RenderPassRenderTargetDesc.CreateDefault(Color4F.black);
            }
            return(result);
        }
Пример #3
0
        public static RenderPassDesc CreateDefault(Color4F clearColorValue, int renderTargetCount, bool clearDepthStencil)
        {
            var result = new RenderPassDesc()
            {
                renderTargetDescs = new RenderPassRenderTargetDesc[renderTargetCount],
                depthStencilDesc  = RenderPassDepthStencilDesc.CreateDefault(clearDepthStencil)
            };

            for (int i = 0; i != renderTargetCount; ++i)
            {
                result.renderTargetDescs[i] = RenderPassRenderTargetDesc.CreateDefault(clearColorValue);
            }
            return(result);
        }
 public abstract RenderPassBase CreateRenderPass(RenderPassDesc desc);
Пример #5
0
 public virtual RenderPassBase CreateRenderPass(RenderPassDesc desc, DepthStencilBase depthStencil)
 {
     throw new NotSupportedException("Only render-textures can create render passes");
 }
Пример #6
0
 public abstract RenderPassBase CreateRenderPass(RenderPassDesc desc, DepthStencilBase depthStencil);
Пример #7
0
 public abstract RenderPassBase CreateRenderPass(RenderPassDesc desc, Texture2DBase[] renderTextures, DepthStencilBase depthStencil);
Пример #8
0
 public abstract RenderPassBase CreateRenderPass(RenderPassDesc desc, Texture2DBase[] renderTextures);