コード例 #1
0
        protected void SubmitDrawsFiltered(int lodIdx, CommandBuffer buf, IDrawFilter filter)
        {
            var lt = OceanRenderer.Instance._lodTransform;

            lt._renderData[lodIdx].Validate(0, this);

            lt.SetViewProjectionMatrices(lodIdx, buf);

            var drawList = RegisterLodDataInputBase.GetRegistrar(GetType());

            foreach (var draw in drawList)
            {
                if (!draw.Enabled)
                {
                    continue;
                }

                int   isTransition;
                float weight = filter.Filter(draw, out isTransition);
                if (weight > 0f)
                {
                    draw.Draw(buf, weight, isTransition);
                }
            }
        }
コード例 #2
0
        protected void SubmitDrawsFiltered(int lodIdx, CommandBuffer buf, IDrawFilter filter)
        {
            var lt = OceanRenderer.Instance._lods[lodIdx];

            lt._renderData.Validate(0, this);

            lt.SetViewProjectionMatrices(buf);

            foreach (var draw in _drawList)
            {
                if (filter.Filter(draw))
                {
                    buf.DrawRenderer(draw.RendererComponent, draw.RendererComponent.sharedMaterial);
                }
            }
        }