13 outcol = (fac > edge) ? color2 : color1;
21 fac =
clamp(fac * mulbias.
x + mulbias.
y, 0.0f, 1.0f);
22 outcol =
mix(color1, color2, fac);
30 fac =
clamp(fac * mulbias.
x + mulbias.
y, 0.0f, 1.0f);
31 fac = fac * fac * (3.0f - 2.0f * fac);
32 outcol =
mix(color1, color2, fac);
43 constexpr float sampler_resolution = 257.0f;
44 constexpr float sampler_offset = 0.5f / sampler_resolution;
45 constexpr float sampler_scale = 1.0f - (1.0f / sampler_resolution);
46 return coordinate * sampler_scale + sampler_offset;
60 fac =
clamp(fac, 0.0f, 1.0f);
void valtorgb(float fac, sampler1DArray colormap, float layer, float4 &outcol, float &outalpha)
void valtorgb_opti_linear(float fac, float2 mulbias, float4 color1, float4 color2, float4 &outcol, float &outalpha)
void valtorgb_opti_ease(float fac, float2 mulbias, float4 color1, float4 color2, float4 &outcol, float &outalpha)
void valtorgb_nearest(float fac, sampler1DArray colormap, float layer, float4 &outcol, float &outalpha)
float compute_color_map_coordinate(float coordinate)
void valtorgb_opti_constant(float fac, float edge, float4 color1, float4 color2, float4 &outcol, float &outalpha)
constexpr T clamp(T, U, U) RET
SamplerBase< float, 1, false, true > sampler1DArray
TEX_TEMPLATE DataVec texture(T, FltCoord, float=0.0f) RET
TEX_TEMPLATE DataVec texelFetch(T, IntCoord, int) RET
TEX_TEMPLATE SizeVec textureSize(T, int) RET