public ImportDecl(ref ptr <Group> Group = default, Pragma Pragma = default, ref ptr <Name> LocalPkgName = default, ref ptr <BasicLit> Path = default, decl decl = default) { this.Group = Group; this.Pragma = Pragma; this.LocalPkgName = LocalPkgName; this.Path = Path; this.m_declRef = new ptr <decl>(decl); }
public File(Pragma Pragma = default, ref ptr <Name> PkgName = default, slice <Decl> DeclList = default, ulong Lines = default, node node = default) { this.Pragma = Pragma; this.PkgName = PkgName; this.DeclList = DeclList; this.Lines = Lines; this.m_nodeRef = new ptr <node>(node); }
public TypeDecl(ref ptr <Group> Group = default, Pragma Pragma = default, ref ptr <Name> Name = default, bool Alias = default, Expr Type = default, decl decl = default) { this.Group = Group; this.Pragma = Pragma; this.Name = Name; this.Alias = Alias; this.Type = Type; this.m_declRef = new ptr <decl>(decl); }
public FuncDecl(Pragma Pragma = default, ref ptr <Field> Recv = default, ref ptr <Name> Name = default, ref ptr <FuncType> Type = default, ref ptr <BlockStmt> Body = default, decl decl = default) { this.Pragma = Pragma; this.Recv = Recv; this.Name = Name; this.Type = Type; this.Body = Body; this.m_declRef = new ptr <decl>(decl); }
public ConstDecl(ref ptr <Group> Group = default, Pragma Pragma = default, slice <ptr <Name> > NameList = default, Expr Type = default, Expr Values = default, decl decl = default) { this.Group = Group; this.Pragma = Pragma; this.NameList = NameList; this.Type = Type; this.Values = Values; this.m_declRef = new ptr <decl>(decl); }
static PragmaCollection ModifyVertexEntry(PragmaCollection pragmas) { // Replace the default vertex shader entry with one defined by VFX. // NOTE: Assumes they are named "Vert" for all shader passes, which they are. const string k_CoreBasicVertex = "#pragma vertex Vert"; var pragmaVFX = new PragmaCollection(); foreach (var pragma in pragmas) { if (pragma.value != k_CoreBasicVertex) { pragmaVFX.Add(pragma.descriptor); } else { pragmaVFX.Add(Pragma.Vertex("VertVFX")); } } return(pragmaVFX); }
public static PassDescriptor BuildPass() { PassDescriptor pass = new PassDescriptor() { // Definition displayName = "DepthOnly", referenceName = "SHADERPASS_DEPTHONLY", lightMode = "DepthOnly", useInPreview = true, // Template passTemplatePath = "Packages/com.unity.shadergraph/Editor/Generation/Targets/BuiltIn/Editor/ShaderGraph/Templates/ShaderPass.template", sharedTemplateDirectories = GenerationUtils.GetDefaultSharedTemplateDirectories(), // Port Mask validVertexBlocks = new BlockFieldDescriptor[] { BlockFields.VertexDescription.Position, BlockFields.VertexDescription.Normal, BlockFields.VertexDescription.Tangent }, validPixelBlocks = new BlockFieldDescriptor[] { BlockFields.SurfaceDescription.Alpha, BlockFields.SurfaceDescription.AlphaClipThreshold }, // Fields structs = new StructCollection { { Structs.Attributes }, { Structs.SurfaceDescriptionInputs }, { Structs.VertexDescriptionInputs } }, fieldDependencies = FieldDependencies.Default, // Conditional State renderStates = null, pragmas = new PragmaCollection { { Pragma.Target(ShaderModel.Target30) }, { Pragma.MultiCompileInstancing }, { Pragma.Vertex("vert") }, { Pragma.Fragment("frag") } }, defines = null, keywords = null, includes = null, customInterpolators = null, }; return(pass); }
public parser(ref ptr <PosBase> file = default, ErrorHandler errh = default, Mode mode = default, PragmaHandler pragh = default, scanner scanner = default, ref ptr <PosBase> @base = default, error first = default, long errcnt = default, Pragma pragma = default, long fnest = default, long xnest = default, slice <byte> indent = default) { this.file = file; this.errh = errh; this.mode = mode; this.pragh = pragh; this.scanner = scanner; this.@base = @base; this.first = first; this.errcnt = errcnt; this.pragma = pragma; this.fnest = fnest; this.xnest = xnest; this.indent = indent; }