Loading video...

Video Failed to Load

Go Home

how shaders work- using Excel =LET(x,(COLUMN()-24)/15,y,(ROW()-15)/15,SIN(SQRT(x*x+y*y)*10-t)) Each cell (pixel) computes its colour just from its coordinates- so the GPU can massively parallelise them. The trick is writing the formula to draw the picture you want

113,343 views • 3 months ago •via X (Twitter)

26 Comments

Matt Henderson's profile picture
Matt Henderson3 months ago

I snuck a t in there. It’s a named cell wired to that slider that every cell reads. In a shader that would be a ‘uniform’. Nudge it and all 1363 cells recompute from scratch. Still stateless cell to cell and frame to frame- every value is just f(x, y, t)

Matt Henderson's profile picture
Matt Henderson3 months ago

Here it is as a real shader

Matt Henderson's profile picture
Matt Henderson3 months ago

(This is a fragment shader- runs once per pixel and returns a colour)

Pamphile Roy's profile picture
Pamphile Roy3 months ago

I know some teams that run full 2D CFD simulations in Excel for prototyping. No joke 😅 Makes me wanna cry though.

John Cotterell's profile picture
John Cotterell3 months ago

Reminds me a little of

Austin Henley's profile picture
Austin Henley3 months ago

Now have it update based on time!

Albert Renshaw's profile picture
Albert Renshaw3 months ago

Can you generate the formula for whatever shader “picture” you want using the same Fourier transform trick people use to get waves to draw any image (but across 3D ofc; if you want it to animate like yours)

Tom Benadryl's profile picture
Tom Benadryl3 months ago

There's this whole category of people where if you put something in Excel where it shouldn't be, it all of the sudden makes sense

Typebulb's profile picture
Typebulb3 months ago

what a clever way to teach the concept

Vincent ᗱƆᑌᑎϹᗴ🦾🔑's profile picture
Vincent ᗱƆᑌᑎϹᗴ🦾🔑3 months ago

I love it, thank you Matt!

Father Photon's profile picture
Father Photon3 months ago

I heard someone wrote finite difference time domain simulations in excel.

Victor's profile picture
Victor3 months ago

You can also transform vertices and rasterize triangles in excel

Charlie Callahan's profile picture
Charlie Callahan3 months ago

We need to see an excel ray tracer or rasterizer

Alexander Petrov's profile picture
Alexander Petrov3 months ago

Can you do a raytracer this way?

Kurt Lee's profile picture
Kurt Lee3 months ago

this is such a clever way to explain shader lol now do bump map

Larry's profile picture
Larry3 months ago

This is the coolest Excel thing I see.

JB's profile picture
JB3 months ago

Perfect, now get Conway’s Game of Life going in Excel

Dr. Tristan Behrens's profile picture
Dr. Tristan Behrens3 months ago

Abomination! But cool.

Matt Henderson's profile picture
Matt Henderson3 months ago

No shade

NiceDay's profile picture
NiceDay3 months ago

You could pass pixel data as uniform via another sheet.

Kid XIII's profile picture
Kid XIII2 months ago

Cool

Sophs n's profile picture
Sophs n3 months ago

do you ever use this for non-visual things like audio or physics

Springblade 🇺🇸's profile picture
Springblade 🇺🇸3 months ago

Cool, but don't you have work to do?!

Максим's profile picture
Максим3 months ago

Expected to see array formula {}

Ger in the Cloud's profile picture
Ger in the Cloud3 months ago

This is very cool!!

Max's profile picture
Max3 months ago

Beautiful! Now, do 'Bad Apple'!

Related Videos

Quantum mechanics has a reputation for being mystical mainly because people skip the rules and jump to interpretations. In this lecture series, we’re doing the opposite. We start from the rules, follow the algebra, and let the picture be the calculation. Classical Probability Theory combines alternatives by adding their probabilities. Quantum Theory combines them one step earlier…add complex amplitudes first, then square at the end. That swap in order is everything. Expand |a₁ + a₂|² and you don’t just get |a₁|² + |a₂|²…you get a cross-term, 2 Re(a₁ a₂*). Its sign is set by phase, so the same two contributions can reinforce or cancel. Interference is just the algebra of squaring a sum. In the 3D render, the surface height is proportional to |a(x)| (so peaks become bright bands after squaring), while the surface skin is colored by the local phase arg(a(x)). As the phase knob φ(t) is swept on path 2, the cross-term oscillates, and you literally watch the interference ridges slide across the screen. We model a detector screen with coordinates x in R² (think x = (x,y)). A quantum state assigns a complex amplitude a(x). The rule for outcomes is p(x) = |a(x)|² Now the key situation: two coherent alternatives contribute to the same outcome x. Let their amplitudes be a₁(x) and a₂(x). Quantum says a(x) = a₁(x) + a₂(x) So the probability density becomes p(x) = |a₁(x) + a₂(x)|² Expand it (this is the whole episode): p(x) = (a₁ + a₂)(a₁* + a₂*) = |a₁|² + |a₂|² + a₁ a₂* + a₁* a₂ = |a₁|² + |a₂|² + 2 Re(a₁ a₂*) That last term is the interference term. It can be positive or negative. To see phase explicitly, write each contribution in polar form: a₁(x) = r₁(x) exp(i θ₁(x)) a₂(x) = r₂(x) exp(i θ₂(x)) Then a₁ a₂* = r₁ r₂ exp(i(θ₁ − θ₂)) So the cross-term is 2 Re(a₁ a₂*) = 2 r₁ r₂ cos(θ₁(x) − θ₂(x)) That’s the fringe engine: p(x) = r₁² + r₂² + 2 r₁ r₂ cos(Δθ(x)) Now the phase knob we animate: Add a controllable phase shift φ to path 2: a₂(x) → a₂(x) exp(i φ) Then Δθ(x) → Δθ(x) − φ, so p(x; φ) = r₁² + r₂² + 2 r₁ r₂ cos(Δθ(x) − φ) As φ changes smoothly, the bright/dark pattern slides continuously. Same setup, same geometry, same magnitudes r₁,r₂, only phase changed. #QuantumMechanics #WaveInterference #ComplexAmplitudes #DoubleSlit #Physics #Mathematics

Mathelirium

81,784 views • 10 months ago