Make the maximum number of simultaneously launched Tetrises for one shader (one Framebuffer texture).
This is the 2021 updated version.
Shader should work fine on every 2015+ Nvidia GPU.
AMD just updated their GPU driver (update to latest driver version, summer 2021 or newer) and this shader now works on AMD GPUs also (tested Vega8 and AMD 560).
Each Tetris runs in three pixels, for 1920x1080 resolution 619200 copies can be run at the same time.
This is not a tutorial, I write only about my way of creating logic and some useful tips and code.
Useful Shaders and Shadertoy related links and tips in my previous blog post.
Shadertoy implementation of “buffer logic” allows read from “buffer previous frame data”(BufferA read self when binded as one of iChannels).
Basic logic —in the buffer on Frame 0 init data and on next frames execute game logic reading…
Links and small descriptions to useful shader-related stuff.
Shadertoy is a great place to create and discover amazing shader-related projects. https://www.shadertoy.com/
iquilezles.org — I highly recommend all materials and articles on this website, created by Inigo Quilez.
Articles include very useful materials such as 2D SDF and 3D SDF, intersectors functions for analytic raycasting, smoothstep like functions, and many others worth checking.
shadertoyunofficial.wordpress.com — lots of useful tips and materials about Shadertoy and shaders, created by Fabrice NEYRET.
Usual tricks in Shadertoy some basics and not very obvious tips, Special Shadertoy features info about Shadertoy variables and resources format.
Shadertoy media files…
Only for KDE 5 (Plasma desktop) and Gnome 3 (Gnome Shell). Wayland and X11.
Install KDE / Plasma — Shader Wallpaper plugin github link.
Plugin can be installed directly from KDE Plasma desktop options. Instruction:
Warning: some of the shaders that installed by default in that “Shader Wallpaper” may crash GPU driver or have a very bad performance, click carefully.
Animation from my GLSL shaders in loops as YouTube and GIFs.
Source code linked for every animation.
Animation recorded using Python script:
Videos on YouTube are looped, right-click on the video and select “Loop”. Short animations in GIFs.
1. Cube lines shader https://www.shadertoy.com/view/NslGRN
This animation also made from Cube Lines shader:
2. Light box shader https://www.shadertoy.com/view/tsfGW4
3. Shadertoy recursion shader https://www.shadertoy.com/view/3stSRH
4. Animation shader for project e-ani https://www.shadertoy.com/view/Wdt3zj
5. Animation shader for Castle game https://www.shadertoy.com/view/NdSGWz
GLSL and usual coding