How can I get a 2D Filter to show the game view rather than being a solid colour?

Like when you put a 2D Black and White Filter in and activate the actuator, it shows the game view. If I make lets say, a red filter using one colour, or texture, it does not show the game view.

Also, is it possible via use of 2D filters to just map it to one object and still use the 2D Filter actuator? If I try VideoTexture to do it, it just returns black as unsupported due to the fact that I am on an M1 mac that does not compile GLSL shaders on objects properly through an integer on the vertex shader.

uniform sampler2D bgl_RenderedTexture;
in vec4 bgl_TexCoord;
out vec4 fragColor;
void main(void) {
    vec4 texcolor = texture(bgl_RenderedTexture, bgl_TexCoord.xy);
    float gray = dot(texcolor.rgb, vec3(1,1,1));
    fragColor = vec4(gray * vec3(1,0,0), texcolor.a);

UPBGE 0.3 Sepia Shader:
Old, but good explanation:

Use bge.types.BL_Shader.setSource instead. Although, I’m not sure if UPBGE 0.3+ still supports this method (it might be different). EDIT: Apparently it’s no longer supported. See here.


SetSource() is depreciated in 0.3. M1 macs use Metal, but the drawback with M1 is that GLSL shaders mapped onto an object will return as black or red (no shader), due to a shader compiling bug in the hardware (GLSL related).

This is because you cannot map a texture onto an int or float value on the Vertex shader in an object.

The shader fails to compile as a result, and causes the error message:

"UNSUPPORTED (log once) GLD_TEXTURE 0 is unloadable and bound to [insert float or int variable here]"

This means you need to place it into an array or something similar, but I don’t know how to do it for UPBGE.

If only I could find a way to work around this annoyance. Never happened on an Intel mac, so I need to find some way to bind the texture to an array or batch that works with UPBGE ingame.