shady
shady copied to clipboard
Help with led cube on Rpi
Hi. I'm new to the world of shaders etc and I'm trying to get shady working on my Rpi 4. I have installed Go on the pi:
pi@raspberrypi:~/rpi-rgb-led-matrix/examples-api-use $ go version
go version go1.16.6 linux/arm
and I'm now trying to work out how to use shady. I've tried this:
../../go/bin/shady -i example2.glsl -ofmt rgb24 -f 20
which complains as follows:
Could initialize engine: failed to call eglCreateContext
I'm not sure if I need OpenGL, and/or what to try next? Sorry, can you help?
Hi,
Looking at my notes. I got that error when I didn't have
MESA_GL_VERSION_OVERRIDE=3.3
set in the env. My command I use is
MESA_GL_VERSION_OVERRIDE=3.3 EGL_PLATFORM=surfaceless shady -i example.glsl -g 64x64 -f 60 -n $((20*60)) -ofmt rgb24 -o ./my-animation.bin
Bill
On Tue, 27 Jul 2021 at 23:08, mph070770 @.***> wrote:
Hi. I'm new to the world of shaders etc and I'm trying to get shady working on my Rpi 4. I have installed Go on the pi:
@.***:~/rpi-rgb-led-matrix/examples-api-use $ go version go version go1.16.6 linux/arm
and I'm now trying to work out how to use shady. I've tried this:
../../go/bin/shady -i example2.glsl -ofmt rgb24 -f 20
which complains as follows:
Could initialize engine: failed to call eglCreateContext
I'm not sure if I need OpenGL, and/or what to try next? Sorry, can you help?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/polyfloyd/shady/issues/14, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABEONYWCPQKFYIXY2KDHI3LTZ4U7JANCNFSM5BDD4UFA .
Thanks @billtraill that solved the issue. I've made some good progress. I have used this shader:
https://www.shadertoy.com/view/4sjXRG
with the following command:
../../go/bin/shady -i example3.glsl -g 128x128 -f 20 -ofmt rgb24 | sudo ./ledcat --led-rows=64 --led-cols=64 --led-slowdown-gpio=4 --led-show-refresh --led-chain=2 --led-parallel=3 --led-pwm-bits=11 --led-pwm-lsb-nanoseconds=100 --led-brightness=80 --led-rgb-sequence RBG
having first set this:
export MESA_GL_VERSION_OVERRIDE=3.3
and I get this:

Very pleased :-). The only thing I need to look at now is a bit of flicker. Thanks again @billtraill.
My hardware is the same one as built here: https://learn.adafruit.com/rgb-led-matrix-cube-for-pi/overview. So it is a chain of 6 panels. I've tried using the command:
../../go/bin/shady -i src-3d.glsl -g 64x64 -f 20 -ofmt rgb24 | ./ledcat --led-rows=64 --led-cols=64 --led-slowdown-gpio=4 --led-chain=6 and using:
MESA_GL_VERSION_OVERRIDE=3.3 EGL_PLATFORM=surfaceless
set in the env.
My results are not so happy:
Any advice welcome