If you set it up correctly, the cube should turn bright red. On an M1 iMac or MacBook, it will instead remain black due to the M1 shader compiling bug. This requires the usage of a Python script in a controller, NOT a 2D Filter actuator and a material property (get the material name you typed in), a shader property that points to the filename that must end in .glsl, and a channel property, this tells the code what node texture to use.
Looks like I’ll have to wait until the Metal version of UPBGE comes out to test and write my own shaders.
By the way, I do check upbge.org’s download page sometimes for new nightly builds, but it can be a month, and still no nightly release build despite it saying “Released a new build every week.” A week is 7 days, not a random amount of days.
With UPBGE 0.36 having Metal support, this would eliminate the slow “compiling shaders (x amount done)” almost completely on the Mac version, as the GPU Metal backend will be able to do it much faster. It would also increase performance, and allow for us, Mac users to once again map our written shaders via videoTexture to an object like I was trying to do without the hassle of trying to write arrays or something complicated just to get it to work.
Shaders as mentioned before, especially 2D filters will be much faster and more responsive.
The M1’s “UNSUPPORTED (log once) POSSIBLE ISSUE” shader compilation bug will no longer be an issue due to shaders being supported on the Metal backend, not the depreciated openGL.
I wonder if SetSource() will come back for 0.36? I’m a bit curious as to when this version would get released.
I’m sorry to drag everyone through this post, but openGL seems to not work properly on M1 when a shader is mapped to an object as a texture through an int value (bge.logic.videotexture.materialID). It should work in the next version through Metal though, although I’m not excited. Nevertheless, I look forward to UPBGE becoming a great game engine for everyone out there.