예제 #1
0
    void OnEnable()
    {
        ResetDSRenderer();
        s_instance = this;
        if (m_depth_prepass==null)
        {
            m_depth_prepass = DepthPrePass;
            m_render = Render;
            GetDSRenderer().AddCallbackPreGBuffer(m_depth_prepass);
            GetDSRenderer().AddCallbackPostGBuffer(m_render);

            m_i_beam_direction = Shader.PropertyToID("beam_direction");
            m_i_base_position = Shader.PropertyToID("base_position");
        }
    }
예제 #2
0
 void OnDisable()
 {
     if (s_instance == this) s_instance = null;
 }