MetaSL Shader Descriptions

Curve Shaders

Description: The mental mill 1D Curve Shader Pack allows you to produce 2D textures and remap float or color with curve functions. Resulting 2D textures can be applied to your objects to create patterned surfaces. The curves can be used to remap values in a non-linear way. A set of one dimensional curve and curve processing node values by means of a curve two gradient nodes that generate 2d textures based on a curve input.

Categories: There are four different categories of curve shaders:

  • Curve Generator Shaders: Generate curves that can be used to drive other curve nodes.
  • Curve Processing Shaders: Modify the result of curve generators by combining them or applying math operations to them
  • Color and Float Remapping Node Shaders: Remap input values by means of a curve. Very useful to remap linear values to follow the curve.
  • Curve-Driven Gradient Generator Shaders: Linear and radial gradients that can be controlled by a curve.

Curve Generator Shaders

The curve shaders in the following table generate a curve of a specific shape. The output "graph out" is for previewing purposes only and shows the shape of the curve. The following list provides you with details about the curves that you can generate:

curve_noise_1d
Generates a 1D noise function. The function curve has three independent layers that allow to control the frequency and the amplitude of each layer.
curve_noise_1d_discrete
Generates a 1D noise function with discrete steps.
Note: Use discrete functions carefully. Discrete steps may cause aliasing artifacts.
curve_bias
Generates a bias curve.
curve_gain
Generates a gain curve.
curve_pulse
Generates a pulse shape. Position, width, height and length of the pulse plateau can be easily adjusted.
curve_stairs
Generates a staircase function. To avoid aliasing artifacts, a soft blending can be applied between the steps.
curve_wave
Generates a curve based on the cosine function.
curve_bias
Generates a bias curve.

Curve Processing Shaders

To further modify 1D curves, curve process shader nodes modify the result of curve nodes. These nodes have inputs of type Shader. This allows the node to use the attached curve values. Their naming scheme is curve_process_ plus the functionality that they perform. To modify a curve, it is necessary that a "curve_" node is attached to the curve intput(s).

Usage Example: Create a curve_process_blend and attach a curve_stairs and a curve_wave to the two curve inputs (Curve A, Curve B). By using the blend parameter of the curve_process_blend shader, you can obtain a wavy staircase and blend between the two curves.

curve_process_abs
Returns the absolute value of a curve. If incoming values are negative, they will be made positive.
curve_process_blend
Blends between two curves using a single float value.
curve_process_curve_blend
Blends between two curves using a third curve.
curve_process_clamp
Clamps a curve by applying an upper and lower limit.
curve_process_min
Returns the minimum value of two curves.
curve_process_max
Returns the maximum value of two curves.
curve_process_scale
Enables you to scale a curve.

Color and Float Remapping Node Shaders

The color and float remapping nodes allow you to modify the color and float intensities based on the input curve.

color_curve_remap
Takes a color value and a curve node as input and modifies the R, G and B of the color value based on the curve.
float_curve_remap
Takes a color value and a curve node as input and modifies the R, G and B of the color value based on the curve.

Curve-Driven Gradient Generator Shaders

The gradient generator nodes allow you to connect a curve or a curve process node to the curve input to create 2D textures.

gradient_linear
Creates a linear ramp based on the curve input. A Boolean allows you to flip the gradient by 90 degrees. The input parameter offset allows you to offset the connected 1D curve or curves.
gradient_radial
Creates a ramp of which the origin is situated at UV 0.5 /0.5 of the first texture space. There are two modes for gradient_radial. The first mode uses the angle around the center, which results in rays originating from the center. The second mode takes the distance from the center and generates circles around it.