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); }
public override void OnVertexBuildHeight(PQS.VertexBuildData data) { var color = overlay.GetPixelColor(data.u, data.v); var height = (double)color.grayscale * Deformity; data.vertHeight += height; }
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
/// <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; } }
/// <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; }
/// <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); }
public override void OnVertexBuild(PQS.VertexBuildData data) { data.vertColor = colorMap.GetPixelColor(data.u, data.v); }