Fixes for newer numpy version and set env var for headless rendering
This commit is contained in:
@@ -57,8 +57,8 @@ colors = np.array([
|
|||||||
|
|
||||||
colors = np.reshape(colors, (colors.size//3, 3))
|
colors = np.reshape(colors, (colors.size//3, 3))
|
||||||
|
|
||||||
grid = np.zeros((Ny,Nx), dtype=np.int)
|
grid = np.zeros((Ny,Nx), dtype=np.int32)
|
||||||
gridout = np.zeros((Ny,Nx), dtype=np.int)
|
gridout = np.zeros((Ny,Nx), dtype=np.int32)
|
||||||
grid[0,:].fill(colors.shape[0]-1)
|
grid[0,:].fill(colors.shape[0]-1)
|
||||||
|
|
||||||
clock = pygame.time.Clock()
|
clock = pygame.time.Clock()
|
||||||
@@ -98,4 +98,4 @@ while True:
|
|||||||
out = np.dstack((state2red(gridout), state2green(gridout), state2blue(gridout))).astype(np.uint8).tobytes()
|
out = np.dstack((state2red(gridout), state2green(gridout), state2blue(gridout))).astype(np.uint8).tobytes()
|
||||||
|
|
||||||
os.write(1, out)
|
os.write(1, out)
|
||||||
clock.tick_busy_loop(fps)
|
clock.tick_busy_loop(fps)
|
||||||
|
|||||||
2
shady.sh
2
shady.sh
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
shaderfile="$(shuf -n1 -e shaders/*)"
|
shaderfile="$(shuf -n1 -e shaders/*)"
|
||||||
|
|
||||||
|
export EGL_PLATFORM=surfaceless
|
||||||
|
export MESA_GL_VERSION_OVERRIDE=3.3
|
||||||
|
|
||||||
shady -i "${shaderfile}" -ofmt rgb24 -g "${1}x${2}" -f "${3:-20}" -rt
|
shady -i "${shaderfile}" -ofmt rgb24 -g "${1}x${2}" -f "${3:-20}" -rt
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user