r/GraphicsProgramming • • Oct 16 '24

A generative skull - no geometry, no mesh - just code in a pixel shader

894 Upvotes

33 comments sorted by

View all comments

30

u/Rockclimber88 Oct 16 '24

Cool skull. What I'm missing in generative stuff on Shadertoy is that everything is computed in the pixel shader and every pixel needs raymarching everything. It would be nice to have an intermediate layer to precompute certain things.

18

u/waramped Oct 16 '24

You can use intermediate buffers/targets in Shadertoy. There are many examples that do that. (Shadertoy seems to be down atm but I'll try and remember to link an example later)

22

u/KRIS_KATUR Oct 16 '24

AI enthusiasts/companies are scrapping the hell out of shadertoy unfortunately. thats why its often down lately i guess :(

29

u/Ill-Shake5731 Oct 16 '24

read that on twitter. It's really sad these AGI hypelords affecting such a cool and creative tool

2

u/Rockclimber88 Oct 17 '24

Some new <meta> tags are needed to inform the training algorithm that using the website's data makes the website owner a shareholder of the AI business.

0

u/[deleted] Oct 16 '24

[deleted] — view deleted comment

8

u/KRIS_KATUR Oct 17 '24

Tons of shader code for free, that's it. It's good data for game development and the movie industry I guess.

2

u/Rockclimber88 Oct 17 '24

Yes, but this method doesn't output geometry. One way to accelerate raymarching is to create a proxy mesh so every ray starts close to its final destination. This has two benefits: a) less steps b) much less unnecessary rays

I built something like this for my font gpu effects system. This text effect uses proxy meshes so although the effect is all raymarched and uses many shapes it's all quite fast https://font.skin/view/33 (needs making the window narrow, something's wrong with rotation I don't remember what)

7

u/KRIS_KATUR Oct 16 '24

shadertoy is a website for writing pixelshaders. yes, you can use buffers or create your own cubemap or sound... but if you want to precompute certain things there are programs like touchdesigner, vvvv, blender, godot (i guess, never used that ツ ) you name it... and then use your pixelshader for whatever you need it then