AmplifyCreations / AmplifyShaderEditor-Feedback

4 stars 0 forks source link

Support Bakery Volume #316

Open laurentopia opened 4 months ago

laurentopia commented 4 months ago

Bakery volume gives lighting approximation that's good enough to replace realtime lights, good on Switch and Quest. A shader graph exists and, in theory, it should be possible to re use the SG BakeryDecodeLightmap.hlsl in ASE via custom expression but this doesn't work.

image

Dawie3565 commented 4 months ago

set to milestone 1.9.8 with already open action #257 "Add native support for Bakery plugin"

laurentopia commented 4 months ago

we're at 1.9.5 so 1.9.8 is quite a long ways away. Can we get some help integrating this hlsl in the meantime?

diogovtx commented 1 month ago

Moved to next release v1.9.7. Also moved https://github.com/AmplifyCreations/AmplifyShaderEditor-Feedback/issues/257 to high priority for the same release.

OwenTheProgrammer commented 1 month ago

Hi! This thread has been brought to my attention recently as I may have a place to start in this. I was asked to make bakery functions for amplify a good while ago, and ive done that id say 90% the way through in my open source github project Feel free to ask about anything, feel free to use however you wish, and of course, feel free to ask questions if you do end up referencing this!

laurentopia commented 1 month ago

I was discussing performance with Dawie who suggested I post this here.

When I adapted McDROID to the Switch it was a game that brought PC to their knees. So I had to redo the rendering. After extensive benchmarking I ended up settling with URP, lights off and specular reconstructed from bakery volumes (which F had just released as an experiment). It was working well with 100s of units onscreen but when things started to get damaged and smoked appeared, framerate tanked. So I ended up stripping out L1 from one of the hlsl functions, and with only L0 to anchor the smoke, performance was back to 60fps. image there was a graph path to turn on or off the use of normals (L1 or L0) image

Also this post by F is very useful to shows how far we're ready to go to gain a few ms on the rendering, especially now in VR. https://github.com/guycalledfrank/bakery-csharp/issues/74#issuecomment-2119181039

I was thinking that outputting reconstructed specular separately would also be useful but these can be computed out of L1 and L0 using Owen's stuff.

So, in conclusion, it would be great if the bakery node exposed L0, L1, this should cover everything that a game needs.