Example #1
0
        public static void OnRenderPipelineChanged(RenderPipeline pipeline)
        {
            bool enableSrpApi = BeamGeometry.isCustomRenderPipelineSupported && pipeline == RenderPipeline.SRP_4_0_0_or_higher;

            Utils.SetShaderKeywordEnabled(MaterialKeywordSRP.kKeyword, enableSrpApi);

#if UNITY_EDITOR
            if (enableSrpApi)
            {
                MaterialKeywordSRP.Create(Instance.beamShader1Pass);
            }
            else
            {
                MaterialKeywordSRP.Delete(Instance.beamShader1Pass);
            }
#endif
        }
Example #2
0
        public static void OnRenderPipelineChanged(RenderPipeline pipeline)
        {
            bool enableSrpApi = ShouldEnableSrpApi(pipeline);

            Utils.SetShaderKeywordEnabled(MaterialKeywordSRP.kKeyword, enableSrpApi);

#if UNITY_EDITOR
            if (enableSrpApi)
            {
                MaterialKeywordSRP.Create(Instance.beamShaderSRP);
            }
            else
            {
                MaterialKeywordSRP.Delete(Instance.beamShaderSRP);
            }
#endif
        }