Exemple #1
0
        public DX11ShaderNode(IPluginHost host, IIOFactory factory)
        {
            this.FHost = host;
            this.FFactory = factory;
            this.TechniqueEnumId = Guid.NewGuid().ToString();

            this.varmanager = new DX11ShaderVariableManager(host, factory);

            this.FHost.CreateTransformInput("Transform In", TSliceMode.Dynamic, TPinVisibility.True, out this.FInWorld);
        }
        public DX11StreamOutShaderNode(IPluginHost host, IIOFactory factory)
        {
            this.FHost = host;
            this.FFactory = factory;
            this.TechniqueEnumId = Guid.NewGuid().ToString();

            InputAttribute inAttr = new InputAttribute("Technique");
            inAttr.EnumName = this.TechniqueEnumId;
            //inAttr.DefaultEnumEntry = defaultenum;
            inAttr.Order = 1000;
            this.FInTechnique = this.FFactory.CreateDiffSpread<EnumEntry>(inAttr);

            this.varmanager = new DX11ImageShaderVariableManager(host, factory);
        }
Exemple #3
0
        public DX11ShaderVariableCache(DX11RenderContext context, DX11ShaderInstance shader, DX11ShaderVariableManager shaderManager)
        {
            shaderPins = shaderManager.ShaderPins.VariablesList;
            for (int i = 0; i < shaderPins.Count; i++)
            {
                this.shaderPinActions.Add(shaderPins[i].CreateAction(shader));
            }
            var world = shaderManager.WorldVariables.VariablesList;

            for (int i = 0; i < world.Count; i++)
            {
                this.worldActions.Add(world[i].CreateAction(shader));
            }
            var global = shaderManager.RenderVariables.VariablesList;

            for (int i = 0; i < global.Count; i++)
            {
                this.globalActions.Add(global[i].CreateAction(shader));
            }
        }