예제 #1
0
            public TemplatePass Build()
            {
                var templatePassInternal = new TemplatePassInternal()
                {
                    m_DisplayNameHandle   = container.AddString(displayName),
                    m_ReferenceNameHandle = container.AddString(referenceName),
                };

                templatePassInternal.m_PassIdentifierHandle           = container.AddPassIdentifier(passIdentifier.SubShaderIndex, passIdentifier.PassIndex);
                templatePassInternal.m_VertexStageElementListHandle   = FixedHandleListInternal.Build(container, vertexStageElements, (e) => BuildStageElement(e));
                templatePassInternal.m_FragmentStageElementListHandle = FixedHandleListInternal.Build(container, fragmentStageElements, (e) => BuildStageElement(e));
                templatePassInternal.m_TagDescriptorListHandle        = FixedHandleListInternal.Build(container, tagDescriptors, (o) => (o.handle));

                var returnTypeHandle = container.AddTemplatePassInternal(templatePassInternal);

                return(new TemplatePass(container, returnTypeHandle));
            }
예제 #2
0
 // private
 internal TemplatePass(ShaderContainer container, FoundryHandle handle)
 {
     this.container    = container;
     this.handle       = handle;
     this.templatePass = container?.GetTemplatePass(handle) ?? TemplatePassInternal.Invalid();
 }
예제 #3
0
 internal extern FoundryHandle AddTemplatePassInternal(TemplatePassInternal templatePass);