public override void Setup(ref TargetSetupContext context) { context.AddAssetDependency(kSourceCodeGuid, AssetCollection.Flags.SourceDependency); if (!context.HasCustomEditorForRenderPipeline("")) { context.AddCustomEditorForRenderPipeline(typeof(BuiltInUnlitGUI).FullName, ""); } // Process SubShaders context.AddSubShader(SubShaders.Unlit(target, target.renderType, target.renderQueue)); }
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)); }
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); } }