ile-de-test/addons/waterways/shaders/filters/dotproduct.gdshader

9 lines
232 B
Text
Raw Normal View History

2023-10-05 18:02:23 +00:00
shader_type canvas_item;
uniform sampler2D input_texture;
void fragment() {
float value = dot(texture(input_texture, UV).xy, vec2(0.0, 1.0));
//value = value * 0.5 + 1.0; // pack values
COLOR = vec4(value, value, value, 1.0);
}