2022-11-13 10:05:53 +00:00
|
|
|
uniform sampler2D colorRamp;
|
2022-10-13 17:39:57 +00:00
|
|
|
uniform highp float opacity;
|
|
|
|
|
|
|
|
varying highp float colorIndex;
|
|
|
|
|
|
|
|
lowp vec4 colorAt( float value )
|
|
|
|
{
|
2022-11-13 10:05:53 +00:00
|
|
|
return texture2D( colorRamp, vec2( value, 0.0 ) );
|
2022-10-13 17:39:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
|
|
|
gl_FragColor = colorAt( colorIndex ) * opacity;
|
|
|
|
}
|