I've published my 2nd coding tutorial!
This time I explore Raymarching, or how you can add a third dimension to your shaders to play with procedurally generated scenes in real-time.
It will open the door to many tutorials built on top of this technique!
I found a copy of my work labelled as « impressive AI generation » and without any attribution…
I created this animation for my shader coding tutorial a year ago:
Just for fun, I've implemented a Convolutional Neural Network (CNN) that predicts handwritten digits...
Fully using
#glsl
and fragment shaders!
The model exactly has 2023 parameters and its inner activations are displayed as you draw
Try it out live!
Eclipse, 336 chars #つぶやきGLSL
for (O *= i; i++ < 60.; O += pow(.0024/(abs(length(u*r-cos(t*.5+i*.009)*sin(i+t)*vec2(cos(i+i*sin(t*.5)*.01+t),sin(i+t)))-1.)+.02+smoothstep(1.,1.5,l)*abs(cos(t*.5)))*(1.+cos(i*.35+l*8.+vec4(0,1,2,0))),O-O+1.1));
Playing with trigonometry and bloom in 243 chars
#つぶやきGLSL
for(O*=l;l++<55.;O+=.005/abs(length(o+vec2(cos(l*(cos(f*.5)*.5+.6)+f),sin(l+f)))-(sin(l+f*4.)*.04+.02))*(cos(l+length(o)*4.+vec4(0,1,2,0))+1.));
I've published my first youtube tutorial about shader coding!
I used manim and shaders for the animations, and the entire voiceover is AI-generated (for audio quality reasons)
My channel will focus on computer graphics, digital art and machine learning:
Merry Xmas in 388 chars! #つぶやきGLSL
for (O*=i;i++<8.;O+=.004/abs(sin(length(u=fract((U-vec2(0,1))*r(-t*.05)*(1.5+i*.1))-.5)*exp(length(u)*1.5-l)*7.+sin(t)*.05)/8.-.3*s*.6+U.x+1.4+sin(U.y*13.+3.)*.1-2.*s+2.2)))*(1.+cos(i*.5+l*5.-t*4.+vec4(0,1,2,0))));
I made a 3D Gaussian Splatting renderer for WebGL!
The following scene renders 1.3M splats in real time.
I wanted to understand a bit more how gaussian splats were rasterized, reimplementing the original paper seemed to be the best approach.
I will publish it on github soon!
Synchronized chaos in 289 chars #つぶやきGLSL
for (O *= m; m < 130.; O+=.002/abs(length(r+sin(e+m*(.2+.035 *smoothstep(-1.,1.,sin(e*.5))))
*vec2(cos(m+e),sin(m+e)))-.005-a*.015)
*(1.+cos(m++*.8+a*4.+e+vec4(0,1,2,0)))
*smoothstep(-.5,.5,a));
"Flowing Wires", 471 chars #つぶやきGLSL
for (O *= i, F += F - R.xy; i++ < 28.;
p = t*normalize(vec3(F*r(t*.1), R.y)),
p.zx*=r(T/4.), p.zy*=r(T/3.), p.x+=T,
t += min(min(s( p = fract(p)-.5 ),
s( vec3(-p.y, p.zx) )),
s( -p.zxy )));
Real-time code:
I'm currently working on a puzzle game that plays with lights & shadows.
I plan to build it in Unity as a mobile game, but I made a first WebGL prototype that you can try on browser!
Made using shaders, 2D raymarching and procedurally generated audio!
I've published the 1st version of my small 2d path-traced project that runs on browser.
Its main feature is a level editor that allow you to build and share your own levels!
I don't guarantee it to be bug-free, feedback & ideas are welcome
Try it live!
I've ported my puzzle prototype to Unity and successfully built the game for WebGL!
If you weren't able to play before, you might have better luck this time
I also added 8 new levels and a progress counter.
Now working on adding new gameplay mechanics!
I've added a new 3D smoke render mode to my
#WebGPU
Fluid Simulation.
It's not an easy task to keep the best performance & quality when using a volume renderer on top of a fluid simulation, so lighting artifacts may appear if 3d enabled.
Try it yourself!
289 chars #つぶやきGLSL
for (O *= t;
O.a++ < 30.;
O += (1. + cos(k+k+t+vec4(0,1,2,0))) / 2e2 / L
)
p = R - vec3(F+F, R.y),
p = t/L*p - 3./R,
M(p.zx) M(p.yx)
p.x -= 2., t -= L - .1;
Real-time:
Painting with global illumination!
This is a little project I'm working on this summer to learn more about 2D path-tracing.
Not sure yet where it is headed, could be a game, a tool, a video tutorial..
Running using
#glsl
shaders and webgl2
I've published my webgl 3D Gaussian Splatting renderer on github!
I'm using adaptive resolution to have a decent framerate when moving around and a sharp image when idle.
Now the big question: is it running smoothly/at all on your machine?
Try it here!
This week I started working on a small game as a playground to experiment with 2D global illumination.
It runs on browsers using webgl2 and
#glsl
shaders, I'll publish a demo once I've made a better level editor!
I aim to add more mechanics that play with lighting and colors
No, this isn't some sort of abstract galaxy renderer.
Just the result of a bug I encountered while tweaking my 3D gaussian splat viewer (it's supposed to be a room!)
Computer graphics bugs are definitely the most entertaining to face
I'm currently porting my WebGL Gaussian Splat renderer to
#webgpu
to try and improve the performance.
I rendered the exact same scene containing 1.1M splats, with WebGL on the left & WebGPU on the right.
For this particular test I observed a 6-10 fps increase!
I've implemented a CNN that predicts handwritten characters with which you can play the hangman game
Still fully using
#glsl
fragment shaders!
You can switch the display mode to see the neural network in action
Try it yourself!
This past month I've been working on creating
a personal website/portofolio to showcase my tutorials, experiments and artworks.
I've used Next.js, tailwindcss, Stripe, and as usual all the animations are running using webgl shaders!
Feedback is welcome:
I'm making faster progress than expected porting my WebGL puzzle game to Unity and C#.
Hopefully I'll be able to build it for WebGL so you can still try the beta versions before the official release on mobile stores!
If you missed the prototype:
You can now upload your own .ply files in my web Gaussian Splatting viewer!
I've also added a raycast algorithm to detect which splat is clicked on screen.
You can use it to set 3 points and define a plane (ground) to orientate your camera upwards.
🔊 I've turned my real-time shader into a music visualizer!
Would you enjoy seeing such visuals in festivals or clubs?
See it live (if your GPU can handle it!)
I'm toying with a new mechanic for my puzzle game!
Instead of moving the light sources, some walls are now dynamic and can affect the lights & shadows casted in the scene.
I've added 10 new levels that play around this idea:
Felt like my raymarching scene was missing some lighting, so I've added an infinite amount of lights and it looks less empty now!
Made in 200 lines of code:
Ok I realize that I might have made the game way too hard!
Just spent 18 minutes trying to clear this level made by
@ZachSaucier
, it's way more complicated than it looks!
Any tip/resource to improve the movement mechanics?
Try the level!
I made a shader that displays its own code (kind of)!
This is just for fun, I could write an entire article about how impractical this is for any real-case use
75+ defines were needed to achieve this, behind the code:
#creativecoding
#glsl
Playing with neon colors in 260 chars #つぶやきGLSL
u=abs(u)*(sin(t)*.25+1.)*3.;
for(O*=i;i<40.;O+=.003/abs(abs(u.x+sin(u.y*2.+i*.1)*.5)+abs(u.y)-sin(t+i*.3+sin(t*.5))*.5-sin(t)*.75-1.55)*(cos(i++*.6+vec4(0,1,2,0))+1.));
For speedrun enthusiasts, I've added a leaderboard to my browser game so you can defend your time in addition to creating your own levels!
Here's a demo of me obtaining the WR on a very vicious level made by
@copyspaghetti
Try to claim the 1st place!
Electric Mesh - 199 chars #つぶやきGLSL
void mainImage(out vec4 O, vec2 u) {
u = abs(u+u-(O.xy=iResolution.xy))/O.y; O *= 0.;
for (float i = 0., t = iTime*.5; i < 46.; O += .002/
abs(abs(u.x-sin(t+i*.17)*.7)+u.y-sin(t+i*.1)*.6)
*(cos(i+++vec4(0,1,2,0))+1.2)); }
#glsl
#mathart
If you're looking for a faster way to sort integers on the web, I've just implemented the paper "Fast 4-way parallel radix sort on GPUs"
It uses the modern WebGPU API and WGSL compute shaders.
I saw amazing results in my upcoming gaussian splat renderer!
For my personal projects I've been working on an advanced web GLSL shader editor featuring:
- uniform synchronisation with a GUI
- optimized timeline for perfect loops
- live recompilation & error checking
- responsive dimensions
- mp4/gif export
I plan to make it available soon!
The code for this animation originally fits in 458 characters but was reduced to 399 chars by
@XorDev
’s amazing optimization techniques!
Check out the code:
« extradimensional »
This animation is made with only a few lines of
#glsl
code that I showcased in the answers of this tweet!
It spells « golfing » as a reference to code golfing, which consists in writing minimalist yet cool shaders!
#creativecoding
I've updated my WebGPU radix sort demo and published it on npm as my very first package!
It can be useful for sorting large buffers exclusively on the GPU and in real-time.
I packaged it using Rollup to support CommonJS, ES modules and <script> tags:
Third official palette named "Corals"
In the next days I'll try to post videos with sound so we can see them react and move to audio - not sure if I'll be able to keep the perfect loop though
Coming soon on
#Cardano
#generativeart
#CNFTCommunity
#CNFTart
I've implemented separate buffer dimensions for the simulation and the dye/coloring part, this way I can increase the canvas res without affecting the simulation & calculations speed.
Here the fluid simulation is on a 512x512 grid while the output canvas is 2048x2048 !
#webgpu