Exemplo n.º 1
0
 public override void Setup(ref TargetSetupContext context)
 {
     context.AddAssetDependency(new GUID(kAssetGuid), AssetCollection.Flags.SourceDependency);
     context.AddAssetDependency(new GUID(kTemplateGuid), AssetCollection.Flags.SourceDependency);
     context.AddSubShader(new SubShaderDescriptor()
     {
         generatesPreview = true,
         passes           = new PassCollection
         {
             { FullscreePasses.MipMap },
         },
     });
 }
Exemplo n.º 2
0
        public override void Setup(ref TargetSetupContext context)
        {
            context.AddAssetDependency(kSourceCodeGuid, AssetCollection.Flags.SourceDependency);
            if (!context.HasCustomEditorForRenderPipeline(null))
            {
                context.customEditorForRenderPipelines.Add((typeof(BuiltInUnlitGUI).FullName, ""));
            }

            // Process SubShaders
            context.AddSubShader(SubShaders.Unlit(target, target.renderType, target.renderQueue));
        }
Exemplo n.º 3
0
        public override void Setup(ref TargetSetupContext context)
        {
            context.AddAssetDependency(kSourceCodeGuid, AssetCollection.Flags.SourceDependency);
            base.Setup(ref context);

            var universalRPType = typeof(UnityEngine.Rendering.Universal.UniversalRenderPipelineAsset);

            if (!context.HasCustomEditorForRenderPipeline(universalRPType))
            {
                context.AddCustomEditorForRenderPipeline(typeof(ShaderGraphUnlitGUI).FullName, universalRPType);
            }

            // Process SubShaders
            context.AddSubShader(SubShaders.UnlitDOTS(target, target.renderType, target.renderQueue));
            context.AddSubShader(SubShaders.Unlit(target, target.renderType, target.renderQueue));
        }
Exemplo n.º 4
0
        public override void Setup(ref TargetSetupContext context)
        {
            context.AddAssetDependency(kSourceCodeGuid, AssetCollection.Flags.SourceDependency);

            // Process SubShaders
            SubShaderDescriptor[] subShaders = { SubShaders.Unlit, SubShaders.UnlitDOTS };
            for (int i = 0; i < subShaders.Length; i++)
            {
                // Update Render State
                subShaders[i].renderType  = target.renderType;
                subShaders[i].renderQueue = target.renderQueue;

                // Add
                context.AddSubShader(subShaders[i]);
            }
        }
Exemplo n.º 5
0
        public override void Setup(ref TargetSetupContext context)
        {
            context.AddAssetDependency(kSourceCodeGuid, AssetCollection.Flags.SourceDependency);
            if (!context.HasCustomEditorForRenderPipeline(null))
            {
                context.customEditorForRenderPipelines.Add((typeof(BuiltInUnlitGUI).FullName, ""));
            }

            // Process SubShaders
            SubShaderDescriptor[] subShaders = { SubShaders.Unlit };
            for (int i = 0; i < subShaders.Length; i++)
            {
                // Update Render State
                subShaders[i].renderType  = target.renderType;
                subShaders[i].renderQueue = target.renderQueue;

                // Add
                context.AddSubShader(subShaders[i]);
            }
        }
        public override void Setup(ref TargetSetupContext context)
        {
            context.AddAssetDependency(kSourceCodeGuid, AssetCollection.Flags.SourceDependency);
            context.AddCustomEditorForRenderPipeline("UnityEditor.Rendering.Universal.DecalShaderGraphGUI", typeof(UnityEngine.Rendering.Universal.UniversalRenderPipelineAsset)); // TODO: This should be owned by URP

            {
                SubShaderDescriptor subShader = SubShaders.Decal;

                var passes = new PassCollection();
                foreach (var pass in subShader.passes)
                {
                    var passDescriptor = pass.descriptor;

                    CollectPassRenderState(ref passDescriptor);

                    passes.Add(passDescriptor, pass.fieldConditions);
                }
                subShader.passes = passes;

                context.AddSubShader(subShader);
            }
        }
Exemplo n.º 7
0
 public override void Setup(ref TargetSetupContext context)
 {
     context.AddAssetDependency(kSourceCodeGuid, AssetCollection.Flags.SourceDependency);
     context.AddSubShader(SubShaders.SpriteLit);
 }
Exemplo n.º 8
0
 public override void Setup(ref TargetSetupContext context)
 {
     context.AddAssetDependency(new GUID(kAssetGuid), AssetCollection.Flags.SourceDependency);
     context.AddAssetDependency(new GUID(kTemplateGuid), AssetCollection.Flags.SourceDependency);
     context.AddSubShader(SubShaders.SpriteUnlit);
 }