Esempio n. 1
0
        private uint GetCrowColor(Schematic schematic, Voxel voxel)
        {
            float distance = MinDistanceToWall(schematic, voxel, mShaderPatina.Thickness);
            float index    = mShaderPatina.TargetColorIndex + mShaderPatina.AdditionalColorRange * (distance / MathF.Sqrt(MathF.Pow(mShaderPatina.Thickness, 2) * 3));

            return(schematic.GetColorAtPaletteIndex((int)index));
        }
Esempio n. 2
0
        private Schematic ProcessSchematicInXAxis(Schematic schematic, ShaderFill shaderFill)
        {
            int  min   = shaderFill.Limit;
            uint color = schematic.GetColorAtPaletteIndex(shaderFill.TargetColorIndex);

            for (int y = 0; y < schematic.Height; y++)
            {
                for (int z = 0; z < schematic.Length; z++)
                {
                    if (shaderFill.FillDirection == FillDirection.PLUS)
                    {
                        for (int x = min; x < schematic.Width; x++)
                        {
                            schematic.AddVoxel(x, y, z, color, shaderFill.Replace);
                        }
                    }
                    else
                    {
                        for (int x = min; x >= 0; x--)
                        {
                            schematic.AddVoxel(x, y, z, color, shaderFill.Replace);
                        }
                    }
                }
            }

            return(schematic);
        }