The shader to halve the red value in Godot 3.0 would be:
shader_type canvas_item;
// Executed for every pixel covered by the sprite on screen
void fragment() {
// Fetch the texture's pixel
vec4 col = texture(TEXTURE, UV);
// Halve R
col.r /= 2.0;
// Assign the color to the output
COLOR = col;
}
You can also do this by halving the color in the modulate
property, because that color is multiplied with the sprite's pixels to tint it, so halving R will halve the final result.