ile-de-test/addons/waterways/shaders/filters/dotproduct.gdshader
2023-10-05 20:02:23 +02:00

9 lines
No EOL
232 B
Text

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);
}