#glsl — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #glsl, aggregated by home.social.
-
@palomakop Disturbing a still image.
One more experiment with modulation by summing pixel values and using them for distortion.
This time: A "sum along the radial line", as seen from the center of the filter area. Works for upstream videos having a black center. Fragmnet shader may be not correct in math.#glsl Fragment shader for "radial sum"
https://gitlab.com/metagrowing/ana/-/blob/master/visual_server/media/frag/sum-radial.frag?ref_type=heads#Clojure for controlling the signal chain
https://gitlab.com/metagrowing/ana/-/blob/master/live_coding/src/demo/frequency_phase_modulation/radial_modulation_of_an_image-c.clj?ref_type=heads -
MIMEcroft.sh: a 3D game written in bash
https://gmatht.github.io/j.cmd/www/MIMEcroft.html is a parody of every 3D game ever, that lovingly pokes fun of bash's reputation for poor performance - by subverting it. MIMEcroft.sh is written entirely in Bash. The game logic, GPU shaders, even the sounds and textures are procedurally generated with bash commands.
One may wonder how MIMEcroft.sh pumps out 90fps at 4K given bash's reputation for poor performance. Indeed, the official GNU bash reference interpreter is poorly optimised compared to languages more commonly used for game development like C++. However, if your web-browser has a GUI it almost certainly also has a highly optimised JavaScript interpreter.
The online JavaScript Commandline OS (j.cmd) did not port the reference implementation of bash and coreutils. Instead it takes the abstract language they describe. This language is translated into JavaScript, which a modern runtime can often reduce to machine code, resulting in performance over a thousand times faster than the original bash.
For a concrete if somewhat contrived example say you are interested in finding numbers with 1337 squares, and use the one-liner:
for i in `seq 1 10000`;do if echo $((i*i)) | grep 1337 > /dev/null;then echo $i;fi;done
In the official bash interpreter, this may take a minute. However, j.cmd implements it by first transpiling it into:
for (let i = 1; i <= 10000; i++) {
if (String(i * i).includes("1337")) {
process.stdout.write(i + "\n");
}
}
sh2.lastExit = 0;Then it is all over in the blink of an eye.
One might well argue that this is not a real bash game since it has to transpile to JS before being run. A stronger argument could be made that C++ games are not real C++ games. A C++ game also has to be compiled. In most "C++" games the developer doesn't even give you the C++ source, you only ever get the compiled machine code. MIMEcroft.sh is stored and distributed as bash. You can edit it as bash (try e.g. `vi /bin/mimecroft.sh` in j.cmd, changing `cys=0.900` to `cys=3.900` and playing the game again). The current version of j.cmd doesn't even cache the transpiled JS version of the game.
____________
It is important to note that j.cmd is experimental and still has many bugs. One little way it is more robust than the traditional bash implementations is that traditional shells tend to break if they source a file that isn’t in their own special format. On the other hand, j.cmd sees different shell formats as just different ways of saying the same thing. It will quite happily run:for f in /home/examples/source.{bat,c,fish,sh,zsh}; do . $f; done
Sourcing C files is still a work in progress in j.cmd. I recently added support for passing linked lists and pointers to bash variables/functions into sourced C functions, and cd'ing around C pointer structure.
#bash #sh #shellScripting #Linux #games #3D #Javascript #GLSL -
Animating the gravity lets us see the structures grow and collapse. Here the gravity varies from -0.155 to -0.125. The image scales based on the gravity amount so it stays approximately the same size.
-
And, in contrast, stronger gravity keeps the particles closer to the origin where they have fewer paths and so form more distinct structures. Too strong, though, and they collapse into simple circles or points. Here is -0.15.
-
The -0.13 * P acts like gravity keeping the particles near the origin. If we weaken it, the particles can move further through the gyroid giving them more branches to take. This can create more interesting structures on the surface, but also more noise in the middle. At -0.12, we get little mushroom caps.
-
Gyroid flow
P += vec3(
sin(P.y)*cos(P.z),
sin(P.z)*cos(P.x),
sin(P.x)*cos(P.y) ) - 0.13 * P -
Сложные сайты на вайбкоде: четыре лендинга, два пути к «дорогим» эффектам и 3D-логотип из спрайтов
TL;DR Я собрал в режиме вайбкодинга четыре лендинга — три для программ МФТИ (Школа Техпреда, конференция «Точка сборки», курс «ИИ Продакт-менеджмент» aimipt.ru ) и ещё один свой, личный. Вайбкодинг здесь — это когда код пишет агент под мою постановку задачи, а я ставлю рамки, правлю и проверяю результат. У всех четырёх есть слой «дорогих» визуальных эффектов: интерактивная вода на WebGL-шейдере с освещением, 3D-логотип Физтеха из тысяч частиц-спрайтов, живая 3D-башня из кубов, облако частиц, которое морфит форму по скроллу. К этому слою я пришёл двумя разными путями. На «Точке сборки» эффекты написаны руками на чистом WebGL — ноль анимационных библиотек. На остальных работает свой движок на Three.js: вынесен отдельными файлами, переиспользуется между сайтами и откатывается на 2D-canvas, если CDN не ответит. На личном лендинге я раскачал этот движок сильнее всего. Между «насмотренностью» и кодом стоит цепочка инструментов: сначала дизайн-система в формате DESIGN.md , из неё мокап в Claude Design, из мокапа handoff-бандл и только потом перенос в код. Ниже — оба пути на реальном коде, эта цепочка и грабли, на которые я наступил. Сразу про проверяемость, чтобы не выглядело как имитация пруфов. Репозитории этих лендингов закрытые — они клиентские. Всё, что ниже выглядит как имена файлов, их размеры и счётчики, — это моя рабочая копия, по ссылке вы её не откроете. Снаружи можно проверить живые страницы и чужой референс, который я разбираю. Код в статье — фрагменты из работающих файлов, приведены как есть.
https://habr.com/ru/companies/alpinadigital/articles/1066732/
#вайбкодинг #WebGL #Threejs #шейдеры #лендинг #Claude_Code #фронтенд #GLSL #анимация #AIагенты
-
It’s the renderer out of my visualizer, released on its own so it can go under other people’s panel projects. MIT, a .deb per arch. https://github.com/holofermes/ghee Drivers for @adafruit ST7789 and SSD1306 panels.
-
Can any #shader guru explain why the first statement gives weird artifacts, and the second one doesn't? Why are they not equivalent?
lut_index_a is indirectly derived from a varying float that comes in from the vertex shader.
The artifacts seem to be occurring in 8x8 pixel blocks which are tied to the viewport, not the geometry.
Using an AMD Radeon RX 7600 on Arch Linux, I think with the Mesa driver.
-
I have been working on a new shader for Magica Voxel.
I’m trying to scan the volume, find voxels of a certain color and draw spheres around them.
I’m trying to come up with clever ways to do an efficient 3D search that doesn’t cluster the search results.
So far I’m using a shell search, mirroring and patterning inspired by adam7 dithering. Still not efficient enough to run on a 256^3 volume. -
CW: flashing images
Messing with ray marching again and accidentally created glitch art heh.
-
A few posts I wrote while learning about atomic operations using compute shaders in OPENRNDR.
My main motivation was to create some kind of automatic luminosity adjustment for unpredictable algorithmic visuals, to avoid them being too dark or burned out as the program runs.
#shaders #GLSL #kotlin #creativeCoding
https://openrndr.discourse.group/t/atomiccounterbuffer-compute-shaders-advanced/776
-
If you're at SIGGRAPH 2026, don't miss the Real-Time Shading BOF — Tuesday, July 21, 1:00–3:00 PM PDT, Room 518
Special guest speaker, Ken Perlin, will be presenting, "The birth of Procedural Shaders." Don't miss it!
https://www.khronos.org/events/siggraph-2026?utm_medium=social&utm_source=bsky&utm_campaign=Shader_BOF&utm_content=events
#Shaders #SIGGRAPH2026 #glsl #hlsl #slang #wgsl #osl -
Конвертируем цвета в JS со скоростью 6 миллиардов операций в секунду
В начале этого года я создал самую быструю JS-библиотеку для работы с цветом: парсинг различных форматов, конвертация в OKLAB/OKLCH, проверка попадания в P3-гамут и многое другое. Библиотека весит всего 7 КБ и не имеет внешних зависимостей. Высокую скорость обеспечили оптимизации под V8: мономорфизм, скрытые классы, ноль лишних аллокаций. Глянуть, что за либа
https://habr.com/ru/articles/1057978/
#JavaScript #WebGL #GPU #фрагментные_шейдеры #GLSL #OKLCH #производительность #оптимизация #canvas #colordx
-
What I'd like to know is, is there a pre-existing tool to turn THIS into something more like THAT?
Not necessarily with the names, but just without the superfluous variables everywhere.
I did it by hand here, and this is one of the shorter, simpler shaders in ACNH. The interesting ones are much bigger.
-
I'm happy because I added a feature I had long wanted:
When I quit the program the state is saved, including 5 floating point EXR textures and a dump of the GPU particles.
When I launch the program again, it continues where it left.
It is no longer reborn every time. Any change in the present has an impact on its future.
-
Hi folks! 👋✌️
Here's an update of "Dima wants crisps 🍟"! 🙂🎬👉 https://fediverse.tv/w/iaVL7qp89sp8jMeh47hW3k
You can download the new version from here 🏔️👉 https://codeberg.org/xolatgames/Dima-wants-crisps/releases/tag/v0.9.0
Or through my website 🙂👉 https://xolat.games/search-by-tags/glfw.html
Have a good day! 😉
#cpp #cplusplus #opengl #gamedev #games #game #prototype #opensource #codeberg #singleplayer #3d #3dgame #3dgames #blender #blender3d #noai #glfw #glfw3 #cmake #cmake3 #codelite #opengl3 #glsl #devlog #devlogs #development
-
Dev-log # 5.7 - Art Updates + free assets
A recap of what we've been up to since April, from The Shipyard to assets released by @khaleer and @YoSoyFreeman .
https://www.patreon.com/Shipyard/posts/dev-log-5-7-art-162184223
#godot #godotengine #shader #volumetrics #lighting #lowpoly #glsl #glsl_shaders #indiedev #indiegame #devlog