Open marklundin opened 2 years ago
Fantastic work so far!
Perhaps it could work like this:
I think it would be ok if this was done only for the clustered lights, saving having to do this for normal lighting as well - as this will get deprecated in not too distant future most likely.
This is fricken amazing! 🥹
Do you have any idea what might be causing the spikes on the ministats GPU plot?
Will take a look @slimbuck, but it could well be the video texture upload which is happening independently of the update loop. I'll remove it and see if it makes a difference
I'm not seeing the same spikes on my machine @slimbuck but I've disabled the video texture upload regardless
I think those spikes are caused by something (likely the GPU) taking longer than one frame, so on occasions a frame is skipped. Probably nothing to worry about at this stage.
Just an update - in the engine 1.55 https://github.com/playcanvas/engine/releases/tag/v1.55.0 we've enabled the clustered lighting as the default lighting solution.
That's great to hear @mvaligursky. I've not managed to integrate with the clustered lighting as yet as I've not had the time. It requires a bit of thought on the atlas texture fetches and sampling the mips without any bleeding
Yep, that should be doable, and I can help. We have some similar parts we can use:
either of these we could probably use for initial non-optimal solution.
This ticket is a request for comments/progress tracker for adding textured area lights as an extension to the current LTC implementation.
DEMO
The above example includes an custom version of the engine (v1.54) that implements textured area lights using the current LTC shader chunks. It's using the cookie texture slot on the lighting system as the light source. Works with diffuse/specular/CC.
The blurriness/roughness is an approximation of a gaussian kernel that uses weighted samples of the mip-chain. This appears to be a better quality blur than many other approaches (especially at higher blurriness levels) but is cheaper to compute than most solutions of a similar quality. The cost is bound to the texture resolution (1k is 10 taps) and independent of the blur strength.
Tasks:
Optional:
Open Questions:
Related PRs Clustered Area Lights Clustered Lights mipmap-less environment lighting
Any feedback welcome @mvaligursky @slimbuck @willeastcott