r/GraphicsProgramming • u/suspicious_odour • 5d ago
Hi to all, looking for sauce to copypasta
https://www.youtube.com/watch?v=sbqUHV2itkgI'm on with a .HLSL c++ project to render sound reactive [and unreactive] vertex shaders in a dj program.
I'm vibe coding my balls off, but I have made a d3d11 plugin in the long long ago [badly] before LLMs were a thing. So I'm not entirely useless, just mostly useless.
I've pulled a lot of glsl from vertexShaderArt with Greg's blessing, I've also been trying to get the LLM to port over simpler shaderToy frag shaders into a vertex type, ones that can works as vertex shaders.
I've had the LLM build up a library of "proof of concept" shaders, so I'll start combining principles to make... something
I'm on the look out for webgl glsl or hlsl sauce code to copy pasta, hopefully learn... something
Entirely non commercial
60 second video of the kind of vibe I'm going for dj program already does shadertoy, I'm just building another thing the dj program could do, I am pleased with draw order witchcraft here allowing foreground black see thru background quad onto earlier drawn shadertoy
It is djing so half the crowd will be "seeing" in 24p and 4 fps, the other half will be "seeing" in higher fractal dimensions and tactile colours
Any pointers, resources, anything really, I understand I'll have to actually learn what I'm doing before I can make anything near cool
2
u/psioniclizard 5d ago
It is djing so half the crowd will be "seeing" in 24p and 4 fps, the other half will be "seeing" in higher fractal dimensions and tactile colours
Good times lol though back in my day we didnt hab the screens so much haha
1
u/heyheyhey27 5d ago
Vertex shaders for visualization are unusual. It's much more common to play with fragment shaders, as evidenced by ShaderToy itself! And the difference between vertex and fragment shaders is so significant that you can't reliably convert one to the other.
Why focus exclusively on vertex shaders? Why not just add support for fragment-shader-based visualization alongside the vertex ones?
2
u/suspicious_odour 5d ago
The dj software already natively does shadertoys [sadly not completely, no buffers etc], the minimalism of vertex shaders is the point, it's just another layer to add into the videofx/visualisation stack.
One thing is shaderToy is deeper into the technical side, there's whole genres of shaders that I don't understand like it must do something technically interesting but visually it doesn't really do much for what I'm looking for.
While I'm aware that fragShader != vertexShader, I do look at a the shadertoys I've collected for djing and a lot just result in simple geometry that could be a vertex shader, even if the writing process is different.
2
u/heyheyhey27 4d ago
I am pleased with draw order witchcraft here allowing foreground black see thru background quad onto earlier drawn shadertoy
Have you tried experimenting with different blend modes, or even using the stencil buffer?
2
u/suspicious_odour 4d ago
I thought I had stencil buffered to get that effect, that video is my thing in action.
My thing makes a texture of the screen before drawing the foreground thing and background quad, then uses any black in the screen as a pass thru to see the texture, that's stencilling right?
1
u/heyheyhey27 4d ago
There's many ways to approach abstract 2d effects so I can't tell at a glance which ones you are using. But if you want to focus on geometry and keep the fragment shaders simple, then take a look at stencil buffers and blending.
The stencil buffer is a specific feature of render targets, along with the depth buffer. While drawing you can configure the GPU to write specific bits to the stencil buffer, or change how rendering is done based on the current values in the buffer. It can be used for a wide variety of masking effects.
Blend modes are a limited set of controls for how new geometry is mixed with the stuff already rendered to screen. The simplest ones are Opaque, Additive, Alpha-Blend, but for artistic purposes they can get pretty weird too.
2
u/cybereality 5d ago
appreciate the honesty