Example #1
0
        public void Accept(ShaderGeneratorContext context)
        {
            RoughnessMap.Accept(context);

            invertBuffer ??= GraphicsResource.CreateBuffer(context.GraphicsDevice, Invert, ResourceFlags.None, HeapType.Upload);

            context.ConstantBufferViews.Add(invertBuffer.DefaultConstantBufferView);
        }
        public void Visit(MaterialGeneratorContext context)
        {
            RoughnessMap.Visit(context);

            invertBuffer ??= GraphicsBuffer.New(context.GraphicsDevice, Invert, ResourceFlags.ConstantBuffer, GraphicsHeapType.Upload).DisposeBy(context.GraphicsDevice);

            context.ConstantBufferViews.Add(invertBuffer);
        }
        public void Visit(MaterialGeneratorContext context)
        {
            RoughnessMap.Visit(context);

            invertBuffer ??= GraphicsBuffer.Constant.New(context.GraphicsDevice, Invert).DisposeBy(context.GraphicsDevice);

            context.ConstantBufferViews.Add(invertBuffer);
        }