How to make a rain on a windshield shader in ShaderToy [video]
youtube.com
youtube.com
What's your use case?
ShaderToy doesn't come with object descriptions, nor with any specific intersection routines. This is just arbitrary glsl (GPU) code that people are doing cool tricks with. You can do regular ray tracing in ShaderToy, for example here's one of mine ray tracing (not ray marching) spheres: https://www.shadertoy.com/view/XllBRf
You don't get a BVH with ShaderToy, unless you manually write something clever yourself. You need a BVH to make blazingly fast ray object intersections, in general.
That said, it's worth understanding the ray marching algorithm that many folks on ShaderToy are using, because it's very very fast, if you can accept the limitations it comes with, and it does give you the hit location in space.
BVH = https://en.wikipedia.org/wiki/Bounding_volume_hierarchy
When I first saw it, I thought the raindrops must be pretty expensive, but the video shows how cheap they are to compute. There's a nice tiling trick so that the shader only evaluates one drop per pixel, but the tiling grid is moving so it's harder to see where the bounds are.
He's also using the Desmos math webapp to design some of the functions, which is a great reminder for me, I keep forgetting about it, and I need a good function plotter handy when I'm working on shaders.
Other features include UI sliders, image saving, pretty decent library, unlimited flexible layers, way easier debugging, and lots more. I'm a huge fan, I'd love for more people to use it too.
I suspect you could do the same with signed distance fields in a way that runs in constant time irrespective of the number of drops at least.
You could also then scale and distort the car lights and add as many as you like without affecting performance either.
Problem is, the browse pages have a 4x3 grid of live WebGL previews (rather than e.g. static images) of the shadertoys.
On my home desktop pc (win10, i4790k@4Ghz, GTX1070, 24 GB) running Chrome this means that inevitably, on page one or two, at least one of the shadertoys will use so much GPU computation that it starves out all other functionality, like being able to switch tabs etc.
And there is a donation system in place https://www.patreon.com/shadertoy
But yeah, to clarify: What they primarily need is someone who gives a shit about the site being functional, secondarily money to cover operating costs. Before the first need is covered, just blindly giving some loose group money seems like it would have a high potential of going to waste.
The code is open source so anyone who wants new features can actually code it (after all, it's a coder community, why not let it code the tool that shadertoy is).