コード例 #1
0
        public void AddDirect(IVoxelStorer storer, IVoxelizationMethod method, RenderView view, VoxelAttribute attr, VoxelizationStage stage, bool output, bool shadows)
        {
            bool toAdd = true;

            foreach (VoxelizationPass pass in passes)
            {
                if (pass.storer.Equals(storer) &&
                    pass.method.Equals(method) &&
                    pass.view.ViewProjection == view.ViewProjection)
                {
                    pass.Add(attr, stage, output, shadows);
                    toAdd = false;
                    break;
                }
            }
            if (toAdd)
            {
                VoxelizationPass pass = new VoxelizationPass
                {
                    storer = storer,
                    method = method,
                    view   = view
                };
                pass.Add(attr, stage, output, shadows);
                passes.Add(pass);
            }
        }
コード例 #2
0
        public bool CanShareRenderStage(IVoxelizationMethod obj)
        {
            if (obj is not VoxelizationMethodDominantAxis)
            {
                return(false);
            }

            return(true);
        }
コード例 #3
0
        public bool CanShareRenderStage(IVoxelizationMethod obj)
        {
            VoxelizationMethodDominantAxis method = obj as VoxelizationMethodDominantAxis;

            if (method == null)
            {
                return(false);
            }
            return(true);
        }
コード例 #4
0
        public bool CanShareRenderStage(IVoxelizationMethod obj)
        {
            VoxelizationMethodSingleAxis method = obj as VoxelizationMethodSingleAxis;

            if (method == null)
            {
                return(false);
            }
            if (method.MultisampleCount != MultisampleCount)
            {
                return(false);
            }
            return(true);
        }
コード例 #5
0
 public void Clear()
 {
     passes.Clear();
     defaultVoxelizationMethod = null;
 }
 public bool CanShareRenderStage(IVoxelizationMethod obj)
 {
     return(Equals(obj));
 }
コード例 #7
0
 public bool CanShareRenderStage(IVoxelizationMethod obj) => Equals(obj);