Hi!
So I made a B&W shader in my game, but i need some elements (in my case particles) to remain colored.
My shader is in canvay layer > color rectangle node:
which is instantiated in main scene
shader code is fairly simple > takes all color value and multiply to make it true B&W
`shader_type canvas_item;
uniform sampler2D SCREEN_TEXTURE : hint_screen_texture, filter_linear_mipmap;
uniform float alpha : hint_range(0.0, 1.0) = 0.0;
uniform bool weighted = true;
void fragment() {
COLOR = texture(SCREEN_TEXTURE, SCREEN_UV);
COLOR.rgb = mix(vec3((COLOR.r + COLOR.g + COLOR.b) / 3.0), vec3(0.299 * COLOR.r + 0.587 * COLOR.g + 0.114 * COLOR.b), float(weighted));
COLOR.a = alpha;
}`
I tried to play with subviewport, but can't get far with it, since having additional subviewport hijacks my mouse input and i can't seem to get around that either
any solutions to it?
thanks!