Esempio n. 1
0
    // Use this for initialization
    void Start()
    {
        List <Vector3> sceneBoundVertexs = BoundVertexsDetector.GetSceneBoundVertexs(sceneAABB);

        Camera     lightCamera   = CreateCamera.Execute(gameObject, null);
        CaptureCSM depthCapturer = lightCamera.gameObject.AddComponent <CaptureCSM>();

        depthCapturer.Init(sceneBoundVertexs, depthCaptureShader, relativeSplitArray, gameObject);
    }
Esempio n. 2
0
    // Use this for initialization
    void Start()
    {
        Camera lightCamera = CreateCamera.Execute(gameObject, depthShadowMap);
        Camera viewCamera  = Camera.main;

        if (frustumType == FrustumType.FIT_TO_SCENE)
        {
            SetFitToScene(lightCamera);
        }
        else
        {
            SetFitToView(lightCamera, viewCamera);
        }

        CaptureDepth depthCapturer = lightCamera.gameObject.AddComponent <CaptureDepth>();

        depthCapturer.SetCaptureShader(depthCaptureShader);

        SetProjectionMatrix.Execute(lightCamera);
    }