コード例 #1
0
 public virtual void Init(PostProcessParam param)
 {
     m_mgr        = param.mgr;
     m_mainCamera = param.mainCamera;
     m_LodLevel   = param.lodLevel;
     m_enable     = false;
 }
コード例 #2
0
    public override void Init(PostProcessParam param)
    {
        base.Init(param);
        m_ComposeMaterial = new Material(Shader.Find("post/multiblur_compose"));

        Check();
        m_Sections.Add(m_radialBlur);
        m_Sections.Add(m_dof);

        for (int i = 0; i < m_Sections.Count; ++i)
        {
            m_Sections[i].Init(this);
        }
    }
コード例 #3
0
    public override void Init(PostProcessParam param)
    {
        base.Init(param);

        GameObject glowCameraObj = new GameObject("GlowCameraObj");

        glowCameraObj.transform.parent   = transform;
        glowCameraObj.transform.position = transform.position;
        glowCameraObj.transform.rotation = transform.rotation;
        glowCamera = glowCameraObj.AddComponent <Camera>();
        glowCamera.CopyFrom(m_mainCamera);
        glowCamera.enabled = false;

        glowComposeMaterial = new Material(Shader.Find("post/glow_compose"));

        glowMaskShader      = Shader.Find("post/glowmask");
        glowMaskDepthShader = Shader.Find("post/glowmask_depth");
    }
コード例 #4
0
    void Awake()
    {
        m_MainCamera = gameObject.GetComponent <Camera>();
        if (m_MainCamera == null)
        {
            Debug.LogError("this script must be main camera component!");
        }

        LODMgr.LOD_LEVEL lodLevel = LODMgr.LOD_LEVEL.LOD_LEVEL_HIGH;
        m_flipPostProcess = gameObject.AddComponent <FlipPostProcess>();
        GenPostProcessChain();
        PostProcessParam param = new PostProcessParam();

        param.mgr        = this;
        param.mainCamera = m_MainCamera;
        param.lodLevel   = lodLevel;
        for (int i = 0; i < m_PostProcessList.Length; ++i)
        {
            m_PostProcessList[i].Init(param);
        }
        m_flipPostProcess.Init(param);
        Regist(this);
    }
コード例 #5
0
    public override void Init(PostProcessParam param)
    {
        base.Init(param);
        m_ComposeMaterial = new Material(Shader.Find("post/compose"));

        GameObject glowCameraObj = new GameObject("RTCameraObj");

        glowCameraObj.transform.parent   = transform;
        glowCameraObj.transform.position = transform.position;
        glowCameraObj.transform.rotation = transform.rotation;
        m_RTCamera = glowCameraObj.AddComponent <Camera>();
        m_RTCamera.CopyFrom(m_mainCamera);
        m_RTCamera.enabled = false;

        Check();
        m_Sections.Add(m_distor);
        m_Sections.Add(m_glow);
        m_Sections.Add(m_bloom);

        for (int i = 0; i < m_Sections.Count; ++i)
        {
            m_Sections[i].Init(this);
        }
    }
コード例 #6
0
 public override void Init(PostProcessParam param)
 {
     base.Init(param);
     composeMaterial = new Material(Shader.Find("post/radial_blur"));
 }
コード例 #7
0
    public override void Init(PostProcessParam param)
    {
        base.Init(param);

        bloomComposeMaterial = new Material(Shader.Find("post/bloom"));
    }