void UpdateCenter(ref Vector3 _mov)
    {
        mCenter += _mov;
        OutputMat.SetVector(ShaderPropertyCenter, new Vector4(mCenter.x, mCenter.y, mCenter.z, NORMALIZE_OCEAN_PLANE_HIT_LENGTH));

        UpdatePrevPrev2Diff(_mov.x, _mov.z);
    }
Ejemplo n.º 2
0
    private void UpdateRef()
    {
        Matrix4x4 refVMatrix = RefCam.worldToCameraMatrix;
        Matrix4x4 refPMatrix = GL.GetGPUProjectionMatrix(RefCam.projectionMatrix, false);
        Matrix4x4 refVP      = refPMatrix * refVMatrix;
        Matrix4x4 refW       = mWaveSetting.renderWater.localToWorldMatrix;

        OutputMat.SetMatrix(ShaderPropertyRefVP, refVP);
        OutputMat.SetMatrix(ShaderPropertyRefW, refW);
        OutputMat.SetTexture(ShaderPropertyWaveTex, RT);
        OutputMat.SetTexture(ShaderPropertyRefTex, RefRT);
    }