コード例 #1
0
        public override void OnVertexBuild(PQS.VertexBuildData data)
        {
            var color = overlay.GetPixelColor(data.u, data.v);

            //if the alpha is 0, use current color. if the alpha is 1, use new color
            data.vertColor = Color.Lerp(data.vertColor, color, color.a);
        }
コード例 #2
0
        public override void OnVertexBuildHeight(PQS.VertexBuildData data)
        {
            var color = overlay.GetPixelColor(data.u, data.v);

            var height = (double)color.grayscale * Deformity;

            data.vertHeight += height;
        }
コード例 #3
0
        public override void OnVertexBuild(PQS.VertexBuildData data)
        {
            Color mapCol      = map.GetPixelColor(data.u, data.v);
            float alpha       = mapCol.a;
            Color vertexColor = new Color(alpha, alpha, alpha, alpha);

            data.vertColor = vertexColor;           //Required for STOCK bodies
        }                                           //Module manager syntax is f*****g difficult, man
コード例 #4
0
        /// <summary>
        /// Called when the parent sphere builds it's height
        /// </summary>
        public override void OnVertexBuildHeight(VertexBuildData data)
        {
            Double h = heightMap.GetPixelColor(data.u, data.v).grayscale;

            if (h < coastHeight)
            {
                data.vertHeight += heightMapOffset;
            }
            else
            {
                data.vertHeight += heightMapOffset + h * heightDeformity;
            }
        }
コード例 #5
0
        /// <summary>
        /// Called when the parent sphere builds it's height
        /// </summary>
        public override void OnVertexBuildHeight(VertexBuildData data)
        {
            Double h = heightMap.GetPixelColor(data.u, data.v).grayscale;

            if (!(h >= heightStart) || !(h <= heightEnd))
            {
                return;
            }
            h = (h - heightStart) * (1d / (heightEnd - heightStart));
            Double n = noiseMap.GetValue(data.directionFromCenter);

            if (n < -1)
            {
                n = -1;
            }
            if (n > 1)
            {
                n = 1;
            }
            data.vertHeight = data.vertHeight + (n + 1) * 0.5 * deformity * h;
        }
コード例 #6
0
 /// <summary>
 /// Called when the parent sphere builds it's color
 /// </summary>
 public override void OnVertexBuild(VertexBuildData data)
 {
     data.vertColor = Color.Lerp(data.vertColor, vertexColorMap.GetPixelColor(data.u, data.v), blend);
 }
コード例 #7
0
 public override void OnVertexBuild(PQS.VertexBuildData data)
 {
     data.vertColor = colorMap.GetPixelColor(data.u, data.v);
 }