maxmuermann / sofluffy

MIT License
37 stars 1 forks source link

performance is not great for many shells but i see this technique around a lot (u have no chat i just wanted to ask a question) #2

Open RichardEllicott opened 3 months ago

RichardEllicott commented 3 months ago

hi thanks for this addon, it's really well written so when i wanted to check out the shell technique it was great, skips me even writing any code to test it out... sorry it's not an issue exactly, it's more of a question (i couldn't find a talk section)

i just wondered, is there any performance hit to passing the shader multiple times, is it not possible to do it in one pass or with one shader? when i was first trying to figure this i thought it would be that the shader had a parameter for the shell count... maybe i am mistaken and it's not possible to do it this way? (that was my main question)

as an asside, the performance being heavy seemed to relegate this technique to be interesting to me, (i'm glad i know about it) but not pratically useful....however i'm checking out lots of games at the moment and found this looking great in Mario tennis, it seems that nintendo uses the technique often with just a couple of layers, and then i guess grass meshes as well (why not both!?)

here's a nice shot of mario tennis in case you hadn't seen it, they have the shells swaying with a sine wave, the there only seems to be a few shells and it has tufts of grass to

0100bde00862a000_2024-07-04_20-41-52-064